From 8049eaf6034f7f4e6f5a25b5915b42fdf0f2f1c3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 1 May 2025 08:10:29 +0000 Subject: [PATCH] CodeGen from PR 33889 in Azure/azure-rest-api-specs Merge 5dceef030933eacf978899bca6d89d3ba374fcaa into bff999c399c77aa08004c5887ba1472af520c499 --- sdk/durabletask/ci.mgmt.yml | 1 - .../Azure.ResourceManager.EventGrid.net8.0.cs | 717 ++++++++++++++- ...esourceManager.EventGrid.netstandard2.0.cs | 717 ++++++++++++++- .../Samples/Sample_CaCertificateCollection.cs | 10 +- .../Samples/Sample_CaCertificateResource.cs | 6 +- ...ample_DomainEventSubscriptionCollection.cs | 20 +- .../Sample_DomainEventSubscriptionResource.cs | 20 +- ...ecurityPerimeterConfigurationCollection.cs | 160 ++++ ...kSecurityPerimeterConfigurationResource.cs | 83 ++ .../Samples/Sample_DomainTopicCollection.cs | 20 +- ..._DomainTopicEventSubscriptionCollection.cs | 20 +- ...le_DomainTopicEventSubscriptionResource.cs | 46 +- .../Samples/Sample_DomainTopicResource.cs | 12 +- .../Sample_EventGridDomainCollection.cs | 20 +- ...mainPrivateEndpointConnectionCollection.cs | 20 +- ...DomainPrivateEndpointConnectionResource.cs | 12 +- ...mple_EventGridDomainPrivateLinkResource.cs | 4 +- ...GridDomainPrivateLinkResourceCollection.cs | 16 +- .../Samples/Sample_EventGridDomainResource.cs | 20 +- ...mple_EventGridNamespaceClientCollection.cs | 10 +- ...EventGridNamespaceClientGroupCollection.cs | 10 +- ...e_EventGridNamespaceClientGroupResource.cs | 6 +- ...Sample_EventGridNamespaceClientResource.cs | 6 +- .../Sample_EventGridNamespaceCollection.cs | 10 +- ...ridNamespacePermissionBindingCollection.cs | 10 +- ...tGridNamespacePermissionBindingResource.cs | 6 +- .../Sample_EventGridNamespaceResource.cs | 12 +- ...pacePrivateEndpointConnectionCollection.cs | 20 +- ...espacePrivateEndpointConnectionResource.cs | 12 +- .../Sample_EventGridTopicCollection.cs | 69 +- ...opicPrivateEndpointConnectionCollection.cs | 20 +- ...dTopicPrivateEndpointConnectionResource.cs | 12 +- ...ample_EventGridTopicPrivateLinkResource.cs | 4 +- ...tGridTopicPrivateLinkResourceCollection.cs | 16 +- .../Samples/Sample_EventGridTopicResource.cs | 24 +- .../Sample_EventSubscriptionCollection.cs | 197 ++-- .../Sample_EventSubscriptionResource.cs | 162 ++-- .../Samples/Sample_ExtensionTopicResource.cs | 4 +- .../Sample_NamespaceTopicCollection.cs | 10 +- ...mespaceTopicEventSubscriptionCollection.cs | 10 +- ...NamespaceTopicEventSubscriptionResource.cs | 10 +- .../Samples/Sample_NamespaceTopicResource.cs | 10 +- .../Sample_PartnerConfigurationResource.cs | 24 +- .../Sample_PartnerDestinationCollection.cs | 199 ++++ .../Sample_PartnerDestinationResource.cs | 144 +++ ...ample_PartnerNamespaceChannelCollection.cs | 22 +- .../Sample_PartnerNamespaceChannelResource.cs | 16 +- .../Sample_PartnerNamespaceCollection.cs | 22 +- ...ple_PartnerNamespacePrivateLinkResource.cs | 4 +- ...rNamespacePrivateLinkResourceCollection.cs | 16 +- .../Sample_PartnerNamespaceResource.cs | 20 +- .../Sample_PartnerRegistrationCollection.cs | 20 +- .../Sample_PartnerRegistrationResource.cs | 15 +- .../Samples/Sample_PartnerTopicCollection.cs | 20 +- ...PartnerTopicEventSubscriptionCollection.cs | 20 +- ...e_PartnerTopicEventSubscriptionResource.cs | 20 +- .../Samples/Sample_PartnerTopicResource.cs | 20 +- .../Sample_SubscriptionResourceExtensions.cs | 77 +- .../Samples/Sample_SystemTopicCollection.cs | 22 +- ..._SystemTopicEventSubscriptionCollection.cs | 20 +- ...le_SystemTopicEventSubscriptionResource.cs | 46 +- .../Samples/Sample_SystemTopicResource.cs | 12 +- ...Sample_TopicEventSubscriptionCollection.cs | 20 +- .../Sample_TopicEventSubscriptionResource.cs | 24 +- ...ecurityPerimeterConfigurationCollection.cs | 160 ++++ ...kSecurityPerimeterConfigurationResource.cs | 83 ++ .../Samples/Sample_TopicSpaceCollection.cs | 10 +- .../Samples/Sample_TopicSpaceResource.cs | 6 +- .../Samples/Sample_TopicTypeCollection.cs | 8 +- .../Samples/Sample_TopicTypeResource.cs | 4 +- .../Sample_VerifiedPartnerCollection.cs | 8 +- .../Samples/Sample_VerifiedPartnerResource.cs | 2 +- .../src/Generated/ArmEventGridModelFactory.cs | 380 ++++++-- .../src/Generated/CaCertificateCollection.cs | 20 +- .../src/Generated/CaCertificateResource.cs | 12 +- .../DomainEventSubscriptionCollection.cs | 20 +- .../DomainEventSubscriptionResource.cs | 20 +- ...ecurityPerimeterConfigurationCollection.cs | 402 ++++++++ ...eterConfigurationResource.Serialization.cs | 26 + ...kSecurityPerimeterConfigurationResource.cs | 257 ++++++ .../src/Generated/DomainTopicCollection.cs | 20 +- .../DomainTopicEventSubscriptionCollection.cs | 20 +- .../DomainTopicEventSubscriptionResource.cs | 112 +-- .../src/Generated/DomainTopicResource.cs | 16 +- .../Generated/EventGridDomainCollection.cs | 20 +- .../EventGridDomainData.Serialization.cs | 34 + .../src/Generated/EventGridDomainData.cs | 23 +- ...mainPrivateEndpointConnectionCollection.cs | 20 +- ...DomainPrivateEndpointConnectionResource.cs | 12 +- .../EventGridDomainPrivateLinkResource.cs | 4 +- ...GridDomainPrivateLinkResourceCollection.cs | 16 +- .../src/Generated/EventGridDomainResource.cs | 119 ++- .../EventGridNamespaceClientCollection.cs | 20 +- ...EventGridNamespaceClientGroupCollection.cs | 20 +- .../EventGridNamespaceClientGroupResource.cs | 12 +- .../EventGridNamespaceClientResource.cs | 12 +- .../Generated/EventGridNamespaceCollection.cs | 20 +- ...ridNamespacePermissionBindingCollection.cs | 20 +- ...tGridNamespacePermissionBindingResource.cs | 12 +- .../Generated/EventGridNamespaceResource.cs | 60 +- ...pacePrivateEndpointConnectionCollection.cs | 20 +- ...espacePrivateEndpointConnectionResource.cs | 12 +- .../Generated/EventGridSubscriptionData.cs | 4 +- .../src/Generated/EventGridTopicCollection.cs | 20 +- .../EventGridTopicData.Serialization.cs | 97 ++ .../src/Generated/EventGridTopicData.cs | 34 +- ...opicPrivateEndpointConnectionCollection.cs | 20 +- ...dTopicPrivateEndpointConnectionResource.cs | 12 +- .../EventGridTopicPrivateLinkResource.cs | 4 +- ...tGridTopicPrivateLinkResourceCollection.cs | 16 +- .../src/Generated/EventGridTopicResource.cs | 115 ++- .../Generated/EventSubscriptionCollection.cs | 32 +- .../Generated/EventSubscriptionResource.cs | 112 +-- .../src/Generated/ExtensionTopicResource.cs | 4 +- .../Extensions/EventGridExtensions.cs | 508 +++++++--- .../Extensions/MockableEventGridArmClient.cs | 88 +- .../MockableEventGridResourceGroupResource.cs | 155 +++- .../MockableEventGridSubscriptionResource.cs | 180 ++-- .../MockableEventGridTenantResource.cs | 8 +- ...tyPerimeterConfigurationOperationSource.cs | 36 + .../PartnerDestinationOperationSource.cs | 36 + ...tyPerimeterConfigurationOperationSource.cs | 36 + .../AlternativeAuthenticationNameSource.cs | 60 ++ ...rtnerClientAuthentication.Serialization.cs | 222 +++++ .../AzureADPartnerClientAuthentication.cs | 41 + ...entAuthenticationSettings.Serialization.cs | 245 +++++ .../Models/ClientAuthenticationSettings.cs | 77 ++ ...enticationManagedIdentity.Serialization.cs | 186 ++++ .../CustomJwtAuthenticationManagedIdentity.cs | 79 ++ ...tomJwtAuthenticationManagedIdentityType.cs | 51 + ...JwtAuthenticationSettings.Serialization.cs | 267 ++++++ .../Models/CustomJwtAuthenticationSettings.cs | 78 ++ ...enticationManagedIdentity.Serialization.cs | 186 ++++ ...tomWebhookAuthenticationManagedIdentity.cs | 79 ++ ...ebhookAuthenticationManagedIdentityType.cs | 51 + .../Models/DeliveryWithResourceIdentity.cs | 4 +- ...odedIssuerCertificateInfo.Serialization.cs | 198 ++++ .../Models/EncodedIssuerCertificateInfo.cs | 84 ++ .../src/Generated/Models/EndpointType.cs | 3 + .../EventGridDomainPatch.Serialization.cs | 16 + .../Generated/Models/EventGridDomainPatch.cs | 23 +- .../Models/EventGridPublicNetworkAccess.cs | 3 + .../src/Generated/Models/EventGridSku.cs | 51 + .../Models/EventGridSubscriptionPatch.cs | 4 +- .../EventGridTopicPatch.Serialization.cs | 16 + .../Generated/Models/EventGridTopicPatch.cs | 23 +- ...ntSubscriptionDestination.Serialization.cs | 1 + .../Models/EventSubscriptionDestination.cs | 2 +- ...EventSubscriptionIdentity.Serialization.cs | 35 +- .../Models/EventSubscriptionIdentity.cs | 16 +- ...tedIdentityCredentialInfo.Serialization.cs | 156 ++++ .../Models/FederatedIdentityCredentialInfo.cs | 73 ++ .../IssuerCertificateInfo.Serialization.cs | 189 ++++ .../Generated/Models/IssuerCertificateInfo.cs | 81 ++ ...picEventSubscriptionPatch.Serialization.cs | 34 +- .../NamespaceTopicEventSubscriptionPatch.cs | 8 +- ...kSecurityPerimeterAssociationAccessMode.cs | 54 ++ ...ecurityPerimeterConfigProvisioningState.cs | 69 ++ ...rityPerimeterConfigurationIssueSeverity.cs | 51 + ...SecurityPerimeterConfigurationIssueType.cs | 57 ++ ...imeterConfigurationIssues.Serialization.cs | 412 +++++++++ ...orkSecurityPerimeterConfigurationIssues.cs | 93 ++ ...erimeterConfigurationList.Serialization.cs | 219 +++++ ...tworkSecurityPerimeterConfigurationList.cs | 70 ++ ...meterConfigurationProfile.Serialization.cs | 354 +++++++ ...rkSecurityPerimeterConfigurationProfile.cs | 88 ++ ...workSecurityPerimeterInfo.Serialization.cs | 234 +++++ .../Models/NetworkSecurityPerimeterInfo.cs | 77 ++ ...erimeterProfileAccessRule.Serialization.cs | 639 +++++++++++++ ...tworkSecurityPerimeterProfileAccessRule.cs | 118 +++ ...rityPerimeterProfileAccessRuleDirection.cs | 51 + .../NetworkSecurityPerimeterResourceType.cs | 51 + ...rtnerClientAuthentication.Serialization.cs | 148 +++ .../Models/PartnerClientAuthentication.cs | 69 ++ .../Models/PartnerClientAuthenticationType.cs | 48 + .../PartnerDestinationActivationState.cs | 51 + .../PartnerDestinationInfo.Serialization.cs | 294 ++++++ .../Models/PartnerDestinationInfo.cs | 107 +++ .../PartnerDestinationPatch.Serialization.cs | 144 +++ .../Models/PartnerDestinationPatch.cs | 67 ++ .../PartnerDestinationProvisioningState.cs | 66 ++ ...nerDestinationsListResult.Serialization.cs | 219 +++++ .../Models/PartnerDestinationsListResult.cs | 70 ++ .../Generated/Models/PartnerEndpointType.cs | 48 + ...ntSubscriptionDestination.Serialization.cs | 192 ++++ .../PartnerEventSubscriptionDestination.cs | 36 + ...tnerNamespaceChannelPatch.Serialization.cs | 17 +- .../Models/PartnerNamespaceChannelPatch.cs | 15 +- ...artnerNamespaceChannelProvisioningState.cs | 3 + .../Models/PartnerNamespaceChannelType.cs | 3 + .../Generated/Models/PartnerNamespacePatch.cs | 4 +- ...tnerUpdateDestinationInfo.Serialization.cs | 117 +++ .../Models/PartnerUpdateDestinationInfo.cs | 69 ++ .../src/Generated/Models/PushInfo.cs | 4 +- .../ResourceAssociation.Serialization.cs | 200 ++++ .../Generated/Models/ResourceAssociation.cs | 71 ++ .../src/Generated/Models/ResourceKind.cs | 51 + ...ResourceMoveChangeHistory.Serialization.cs | 235 +++++ .../Models/ResourceMoveChangeHistory.cs | 76 ++ .../Models/ResourceSku.Serialization.cs | 166 ++++ .../src/Generated/Models/ResourceSku.cs | 66 ++ .../TopicSpacesConfiguration.Serialization.cs | 31 + .../Models/TopicSpacesConfiguration.cs | 7 +- ...rtnerClientAuthentication.Serialization.cs | 140 +++ .../UnknownPartnerClientAuthentication.cs | 29 + ...ownPartnerDestinationInfo.Serialization.cs | 302 ++++++ .../Models/UnknownPartnerDestinationInfo.cs | 40 + ...tnerUpdateDestinationInfo.Serialization.cs | 110 +++ .../UnknownPartnerUpdateDestinationInfo.cs | 29 + ...icSpacesConfigurationInfo.Serialization.cs | 16 + .../UpdateTopicSpacesConfigurationInfo.cs | 7 +- .../WebHookEventSubscriptionDestination.cs | 8 +- ...ookAuthenticationSettings.Serialization.cs | 272 ++++++ .../Models/WebhookAuthenticationSettings.cs | 105 +++ ...ookPartnerDestinationInfo.Serialization.cs | 413 +++++++++ .../Models/WebhookPartnerDestinationInfo.cs | 65 ++ ...atePartnerDestinationInfo.Serialization.cs | 170 ++++ .../WebhookUpdatePartnerDestinationInfo.cs | 54 ++ .../src/Generated/NamespaceTopicCollection.cs | 20 +- ...mespaceTopicEventSubscriptionCollection.cs | 20 +- ...opicEventSubscriptionData.Serialization.cs | 65 ++ .../NamespaceTopicEventSubscriptionData.cs | 8 +- ...NamespaceTopicEventSubscriptionResource.cs | 379 +++++++- .../src/Generated/NamespaceTopicResource.cs | 24 +- ...erimeterConfigurationData.Serialization.cs | 402 ++++++++ ...tworkSecurityPerimeterConfigurationData.cs | 97 ++ .../Generated/PartnerConfigurationResource.cs | 36 +- .../Generated/PartnerDestinationCollection.cs | 498 ++++++++++ .../PartnerDestinationData.Serialization.cs | 527 +++++++++++ .../src/Generated/PartnerDestinationData.cs | 120 +++ ...artnerDestinationResource.Serialization.cs | 26 + .../Generated/PartnerDestinationResource.cs | 783 ++++++++++++++++ .../PartnerNamespaceChannelCollection.cs | 20 +- ...rtnerNamespaceChannelData.Serialization.cs | 31 + .../Generated/PartnerNamespaceChannelData.cs | 15 +- .../PartnerNamespaceChannelResource.cs | 16 +- .../Generated/PartnerNamespaceCollection.cs | 20 +- .../src/Generated/PartnerNamespaceData.cs | 4 +- .../PartnerNamespacePrivateLinkResource.cs | 4 +- ...rNamespacePrivateLinkResourceCollection.cs | 16 +- .../src/Generated/PartnerNamespaceResource.cs | 44 +- .../PartnerRegistrationCollection.cs | 20 +- .../Generated/PartnerRegistrationResource.cs | 24 +- .../src/Generated/PartnerTopicCollection.cs | 20 +- ...PartnerTopicEventSubscriptionCollection.cs | 20 +- .../PartnerTopicEventSubscriptionResource.cs | 20 +- .../src/Generated/PartnerTopicResource.cs | 36 +- .../CaCertificatesRestOperations.cs | 2 +- .../RestOperations/ChannelsRestOperations.cs | 2 +- .../ClientGroupsRestOperations.cs | 2 +- .../RestOperations/ClientsRestOperations.cs | 2 +- .../DomainEventSubscriptionsRestOperations.cs | 2 +- ...inTopicEventSubscriptionsRestOperations.cs | 222 ++--- .../DomainTopicsRestOperations.cs | 2 +- .../RestOperations/DomainsRestOperations.cs | 2 +- .../EventSubscriptionsRestOperations.cs | 174 ++-- .../ExtensionTopicsRestOperations.cs | 2 +- ...ceTopicEventSubscriptionsRestOperations.cs | 2 +- .../NamespaceTopicsRestOperations.cs | 2 +- .../NamespacesRestOperations.cs | 2 +- ...tyPerimeterConfigurationsRestOperations.cs | 365 ++++++++ .../PartnerConfigurationsRestOperations.cs | 2 +- .../PartnerDestinationsRestOperations.cs | 869 ++++++++++++++++++ .../PartnerNamespacesRestOperations.cs | 2 +- .../PartnerRegistrationsRestOperations.cs | 2 +- ...erTopicEventSubscriptionsRestOperations.cs | 2 +- .../PartnerTopicsRestOperations.cs | 2 +- .../PermissionBindingsRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../PrivateLinkResourcesRestOperations.cs | 2 +- ...emTopicEventSubscriptionsRestOperations.cs | 206 ++--- .../SystemTopicsRestOperations.cs | 2 +- .../TopicEventSubscriptionsRestOperations.cs | 2 +- .../TopicSpacesRestOperations.cs | 2 +- .../TopicTypesRestOperations.cs | 2 +- .../RestOperations/TopicsRestOperations.cs | 2 +- .../VerifiedPartnersRestOperations.cs | 2 +- .../src/Generated/SystemTopicCollection.cs | 20 +- .../SystemTopicEventSubscriptionCollection.cs | 20 +- .../SystemTopicEventSubscriptionResource.cs | 112 +-- .../src/Generated/SystemTopicResource.cs | 28 +- .../TopicEventSubscriptionCollection.cs | 20 +- .../TopicEventSubscriptionResource.cs | 20 +- ...ecurityPerimeterConfigurationCollection.cs | 402 ++++++++ ...eterConfigurationResource.Serialization.cs | 26 + ...kSecurityPerimeterConfigurationResource.cs | 257 ++++++ .../src/Generated/TopicSpaceCollection.cs | 20 +- .../src/Generated/TopicSpaceResource.cs | 12 +- .../src/Generated/TopicTypeCollection.cs | 16 +- .../src/Generated/TopicTypeResource.cs | 8 +- .../Generated/VerifiedPartnerCollection.cs | 16 +- .../VerifiedPartnerData.Serialization.cs | 31 + .../src/Generated/VerifiedPartnerData.cs | 7 +- .../src/Generated/VerifiedPartnerResource.cs | 4 +- .../src/autorest.md | 2 +- sdk/pineconevectordb/ci.yml | 35 - sdk/storage/ci.yml | 2 + 297 files changed, 20774 insertions(+), 2154 deletions(-) create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainNetworkSecurityPerimeterConfigurationCollection.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainNetworkSecurityPerimeterConfigurationResource.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerDestinationCollection.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerDestinationResource.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicNetworkSecurityPerimeterConfigurationCollection.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicNetworkSecurityPerimeterConfigurationResource.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationCollection.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationResource.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationResource.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/DomainNetworkSecurityPerimeterConfigurationOperationSource.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/PartnerDestinationOperationSource.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/TopicNetworkSecurityPerimeterConfigurationOperationSource.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AlternativeAuthenticationNameSource.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentityType.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentity.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentity.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentityType.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EncodedIssuerCertificateInfo.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EncodedIssuerCertificateInfo.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSku.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FederatedIdentityCredentialInfo.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FederatedIdentityCredentialInfo.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterAssociationAccessMode.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigProvisioningState.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssueSeverity.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssueType.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRuleDirection.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterResourceType.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthenticationType.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationActivationState.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationProvisioningState.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEndpointType.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceKind.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookAuthenticationSettings.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookAuthenticationSettings.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationCollection.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationResource.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationResource.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerDestinationsRestOperations.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationCollection.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationResource.Serialization.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationResource.cs delete mode 100644 sdk/pineconevectordb/ci.yml diff --git a/sdk/durabletask/ci.mgmt.yml b/sdk/durabletask/ci.mgmt.yml index 5f63204cd804..32b11e75b082 100644 --- a/sdk/durabletask/ci.mgmt.yml +++ b/sdk/durabletask/ci.mgmt.yml @@ -1,7 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none - pr: branches: include: diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.net8.0.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.net8.0.cs index a45b5c1a0266..7a6517ac5387 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.net8.0.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.net8.0.cs @@ -91,6 +91,38 @@ protected DomainEventSubscriptionResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.EventGridSubscriptionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.EventGridSubscriptionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class DomainNetworkSecurityPerimeterConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DomainNetworkSecurityPerimeterConfigurationCollection() { } + public virtual Azure.Response Exists(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DomainNetworkSecurityPerimeterConfigurationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DomainNetworkSecurityPerimeterConfigurationResource() { } + public virtual Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName, string perimeterGuid, string associationName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Reconcile(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ReconcileAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DomainTopicCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected DomainTopicCollection() { } @@ -216,6 +248,7 @@ public EventGridDomainData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridDomainData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -305,6 +338,9 @@ protected EventGridDomainResource() { } public virtual Azure.Response GetDomainEventSubscription(string eventSubscriptionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDomainEventSubscriptionAsync(string eventSubscriptionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EventGrid.DomainEventSubscriptionCollection GetDomainEventSubscriptions() { throw null; } + public virtual Azure.Response GetDomainNetworkSecurityPerimeterConfiguration(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDomainNetworkSecurityPerimeterConfigurationAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.EventGrid.DomainNetworkSecurityPerimeterConfigurationCollection GetDomainNetworkSecurityPerimeterConfigurations() { throw null; } public virtual Azure.Response GetDomainTopic(string domainTopicName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDomainTopicAsync(string domainTopicName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EventGrid.DomainTopicCollection GetDomainTopics() { throw null; } @@ -334,6 +370,7 @@ public static partial class EventGridExtensions { public static Azure.ResourceManager.EventGrid.CaCertificateResource GetCaCertificateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EventGrid.DomainEventSubscriptionResource GetDomainEventSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.EventGrid.DomainNetworkSecurityPerimeterConfigurationResource GetDomainNetworkSecurityPerimeterConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EventGrid.DomainTopicEventSubscriptionResource GetDomainTopicEventSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EventGrid.DomainTopicResource GetDomainTopicResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetEventGridDomain(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -380,6 +417,12 @@ public static partial class EventGridExtensions public static Azure.ResourceManager.EventGrid.PartnerConfigurationResource GetPartnerConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetPartnerConfigurations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetPartnerConfigurationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetPartnerDestination(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPartnerDestinationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.EventGrid.PartnerDestinationResource GetPartnerDestinationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.EventGrid.PartnerDestinationCollection GetPartnerDestinations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetPartnerDestinations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetPartnerDestinationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetPartnerNamespace(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string partnerNamespaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetPartnerNamespaceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string partnerNamespaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EventGrid.PartnerNamespaceChannelResource GetPartnerNamespaceChannelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -417,6 +460,7 @@ public static partial class EventGridExtensions public static Azure.Pageable GetSystemTopics(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetSystemTopicsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EventGrid.TopicEventSubscriptionResource GetTopicEventSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.EventGrid.TopicNetworkSecurityPerimeterConfigurationResource GetTopicNetworkSecurityPerimeterConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EventGrid.TopicSpaceResource GetTopicSpaceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetTopicType(this Azure.ResourceManager.Resources.TenantResource tenantResource, string topicTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetTopicTypeAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, string topicTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -773,16 +817,19 @@ public EventGridTopicData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? DataResidencyBoundary { get { throw null; } set { } } public System.Uri Endpoint { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo EventTypeInfo { get { throw null; } set { } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IList InboundIPRules { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? InputSchema { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping InputSchemaMapping { get { throw null; } set { } } public bool? IsLocalAuthDisabled { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.ResourceKind? Kind { get { throw null; } set { } } public string MetricResourceId { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.TlsVersion? MinimumTlsVersionAllowed { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridTopicData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -880,6 +927,9 @@ protected EventGridTopicResource() { } public virtual Azure.Response GetTopicEventSubscription(string eventSubscriptionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetTopicEventSubscriptionAsync(string eventSubscriptionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EventGrid.TopicEventSubscriptionCollection GetTopicEventSubscriptions() { throw null; } + public virtual Azure.Response GetTopicNetworkSecurityPerimeterConfiguration(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTopicNetworkSecurityPerimeterConfigurationAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.EventGrid.TopicNetworkSecurityPerimeterConfigurationCollection GetTopicNetworkSecurityPerimeterConfigurations() { throw null; } public virtual Azure.ResourceManager.ArmOperation RegenerateKey(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.TopicRegenerateKeyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RegenerateKeyAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.TopicRegenerateKeyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1017,6 +1067,7 @@ public NamespaceTopicEventSubscriptionData() { } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.FiltersConfiguration FiltersConfiguration { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1030,6 +1081,8 @@ public partial class NamespaceTopicEventSubscriptionResource : Azure.ResourceMan protected NamespaceTopicEventSubscriptionResource() { } public virtual Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string eventSubscriptionName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1039,6 +1092,10 @@ protected NamespaceTopicEventSubscriptionResource() { } public virtual Azure.AsyncPageable GetDeliveryAttributesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetFullUri(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetFullUriAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1073,6 +1130,21 @@ protected NamespaceTopicResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.NamespaceTopicPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.NamespaceTopicPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class NetworkSecurityPerimeterConfigurationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkSecurityPerimeterConfigurationData() { } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterInfo NetworkSecurityPerimeter { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile Profile { get { throw null; } set { } } + public System.Collections.Generic.IList ProvisioningIssues { get { throw null; } } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState? ProvisioningState { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.ResourceAssociation ResourceAssociation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PartnerConfigurationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PartnerConfigurationData(Azure.Core.AzureLocation location) { } @@ -1116,6 +1188,67 @@ protected PartnerConfigurationResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.PartnerConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.PartnerConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class PartnerDestinationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PartnerDestinationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string partnerDestinationName, Azure.ResourceManager.EventGrid.PartnerDestinationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string partnerDestinationName, Azure.ResourceManager.EventGrid.PartnerDestinationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class PartnerDestinationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PartnerDestinationData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState? ActivationState { get { throw null; } set { } } + public System.Uri EndpointBaseUri { get { throw null; } set { } } + public string EndpointServiceContext { get { throw null; } set { } } + public System.DateTimeOffset? ExpirationTimeIfNotActivatedUtc { get { throw null; } set { } } + public string MessageForActivation { get { throw null; } set { } } + public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.PartnerDestinationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.PartnerDestinationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PartnerDestinationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PartnerDestinationResource() { } + public virtual Azure.ResourceManager.EventGrid.PartnerDestinationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response Activate(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ActivateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string partnerDestinationName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.EventGrid.PartnerDestinationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.PartnerDestinationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.PartnerDestinationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.PartnerDestinationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class PartnerNamespaceChannelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected PartnerNamespaceChannelCollection() { } @@ -1139,6 +1272,7 @@ public PartnerNamespaceChannelData() { } public Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType? ChannelType { get { throw null; } set { } } public System.DateTimeOffset? ExpireOnIfNotActivated { get { throw null; } set { } } public string MessageForActivation { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo PartnerDestinationInfo { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo PartnerTopicInfo { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState? ReadinessState { get { throw null; } set { } } @@ -1576,6 +1710,38 @@ protected TopicEventSubscriptionResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.EventGridSubscriptionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.EventGridSubscriptionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class TopicNetworkSecurityPerimeterConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TopicNetworkSecurityPerimeterConfigurationCollection() { } + public virtual Azure.Response Exists(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class TopicNetworkSecurityPerimeterConfigurationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected TopicNetworkSecurityPerimeterConfigurationResource() { } + public virtual Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName, string perimeterGuid, string associationName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Reconcile(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ReconcileAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class TopicSpaceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected TopicSpaceCollection() { } @@ -1696,6 +1862,7 @@ public partial class VerifiedPartnerData : Azure.ResourceManager.Models.Resource { public VerifiedPartnerData() { } public string OrganizationName { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.PartnerDetails PartnerDestinationDetails { get { throw null; } set { } } public string PartnerDisplayName { get { throw null; } set { } } public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerDetails PartnerTopicDetails { get { throw null; } set { } } @@ -1730,6 +1897,7 @@ public partial class MockableEventGridArmClient : Azure.ResourceManager.ArmResou protected MockableEventGridArmClient() { } public virtual Azure.ResourceManager.EventGrid.CaCertificateResource GetCaCertificateResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.DomainEventSubscriptionResource GetDomainEventSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.EventGrid.DomainNetworkSecurityPerimeterConfigurationResource GetDomainNetworkSecurityPerimeterConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.DomainTopicEventSubscriptionResource GetDomainTopicEventSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.DomainTopicResource GetDomainTopicResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.EventGridDomainPrivateEndpointConnectionResource GetEventGridDomainPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1754,6 +1922,7 @@ protected MockableEventGridArmClient() { } public virtual Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionResource GetNamespaceTopicEventSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.NamespaceTopicResource GetNamespaceTopicResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerConfigurationResource GetPartnerConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.EventGrid.PartnerDestinationResource GetPartnerDestinationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerNamespaceChannelResource GetPartnerNamespaceChannelResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerNamespacePrivateLinkResource GetPartnerNamespacePrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerNamespaceResource GetPartnerNamespaceResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1763,6 +1932,7 @@ protected MockableEventGridArmClient() { } public virtual Azure.ResourceManager.EventGrid.SystemTopicEventSubscriptionResource GetSystemTopicEventSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.SystemTopicResource GetSystemTopicResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.TopicEventSubscriptionResource GetTopicEventSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.EventGrid.TopicNetworkSecurityPerimeterConfigurationResource GetTopicNetworkSecurityPerimeterConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.TopicSpaceResource GetTopicSpaceResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.TopicTypeResource GetTopicTypeResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.VerifiedPartnerResource GetVerifiedPartnerResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1782,6 +1952,9 @@ protected MockableEventGridResourceGroupResource() { } public virtual Azure.Pageable GetGlobalEventSubscriptionsDataForTopicType(string topicTypeName, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetGlobalEventSubscriptionsDataForTopicTypeAsync(string topicTypeName, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerConfigurationResource GetPartnerConfiguration() { throw null; } + public virtual Azure.Response GetPartnerDestination(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPartnerDestinationAsync(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.EventGrid.PartnerDestinationCollection GetPartnerDestinations() { throw null; } public virtual Azure.Response GetPartnerNamespace(string partnerNamespaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetPartnerNamespaceAsync(string partnerNamespaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerNamespaceCollection GetPartnerNamespaces() { throw null; } @@ -1812,6 +1985,8 @@ protected MockableEventGridSubscriptionResource() { } public virtual Azure.AsyncPageable GetGlobalEventSubscriptionsDataForTopicTypeAsync(string topicTypeName, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPartnerConfigurations(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPartnerConfigurationsAsync(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetPartnerDestinations(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPartnerDestinationsAsync(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPartnerNamespaces(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPartnerNamespacesAsync(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPartnerRegistrations(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1849,12 +2024,35 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AlternativeAuthenticationNameSource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AlternativeAuthenticationNameSource(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource ClientCertificateDns { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource ClientCertificateEmail { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource ClientCertificateIP { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource ClientCertificateSubject { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource ClientCertificateUri { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource left, Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource left, Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource right) { throw null; } + public override string ToString() { throw null; } + } public static partial class ArmEventGridModelFactory { public static Azure.ResourceManager.EventGrid.CaCertificateData CaCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string encodedCertificate = null, System.DateTimeOffset? issueTimeInUtc = default(System.DateTimeOffset?), System.DateTimeOffset? expiryTimeInUtc = default(System.DateTimeOffset?), Azure.ResourceManager.EventGrid.Models.CaCertificateProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.CaCertificateProvisioningState?)) { throw null; } public static Azure.ResourceManager.EventGrid.Models.CustomDomainOwnershipValidationResult CustomDomainOwnershipValidationResult(System.Collections.Generic.IEnumerable customDomainsForTopicsConfiguration = null, System.Collections.Generic.IEnumerable customDomainsForTopicSpacesConfiguration = null) { throw null; } public static Azure.ResourceManager.EventGrid.DomainTopicData DomainTopicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.DomainTopicProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.DomainTopicProvisioningState?)) { throw null; } - public static Azure.ResourceManager.EventGrid.EventGridDomainData EventGridDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState?), Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?), System.Uri endpoint = null, Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema = default(Azure.ResourceManager.EventGrid.Models.EventGridInputSchema?), Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo = null, Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess?), System.Collections.Generic.IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = default(bool?), bool? autoCreateTopicWithFirstSubscription = default(bool?), bool? autoDeleteTopicWithLastSubscription = default(bool?), Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary = default(Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.EventGridDomainData EventGridDomainData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState? provisioningState, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed, System.Uri endpoint, Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema, Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo, Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess, System.Collections.Generic.IEnumerable inboundIPRules, bool? isLocalAuthDisabled, bool? autoCreateTopicWithFirstSubscription, bool? autoDeleteTopicWithLastSubscription, Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary) { throw null; } + public static Azure.ResourceManager.EventGrid.EventGridDomainData EventGridDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EventGrid.Models.EventGridSku? skuName = default(Azure.ResourceManager.EventGrid.Models.EventGridSku?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState?), Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?), System.Uri endpoint = null, Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema = default(Azure.ResourceManager.EventGrid.Models.EventGridInputSchema?), Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo = null, Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess?), System.Collections.Generic.IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = default(bool?), bool? autoCreateTopicWithFirstSubscription = default(bool?), bool? autoDeleteTopicWithLastSubscription = default(bool?), Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary = default(Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary?)) { throw null; } public static Azure.ResourceManager.EventGrid.Models.EventGridDomainSharedAccessKeys EventGridDomainSharedAccessKeys(string key1 = null, string key2 = null) { throw null; } public static Azure.ResourceManager.EventGrid.EventGridNamespaceClientData EventGridNamespaceClientData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string authenticationName = null, Azure.ResourceManager.EventGrid.Models.ClientCertificateAuthentication clientCertificateAuthentication = null, Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientState? state = default(Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientState?), System.Collections.Generic.IDictionary attributes = null, Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientProvisioningState?)) { throw null; } public static Azure.ResourceManager.EventGrid.EventGridNamespaceClientGroupData EventGridNamespaceClientGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string query = null, Azure.ResourceManager.EventGrid.Models.ClientGroupProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.ClientGroupProvisioningState?)) { throw null; } @@ -1863,15 +2061,23 @@ public static partial class ArmEventGridModelFactory public static Azure.ResourceManager.EventGrid.EventGridPrivateEndpointConnectionData EventGridPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.ResourceManager.EventGrid.Models.EventGridPrivateEndpointConnectionState connectionState = null, Azure.ResourceManager.EventGrid.Models.EventGridResourceProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridResourceProvisioningState?)) { throw null; } public static Azure.ResourceManager.EventGrid.EventGridPrivateLinkResourceData EventGridPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, string displayName = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } public static Azure.ResourceManager.EventGrid.EventGridSubscriptionData EventGridSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string topic = null, Azure.ResourceManager.EventGrid.Models.EventSubscriptionProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventSubscriptionProvisioningState?), Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination destination = null, Azure.ResourceManager.EventGrid.Models.DeliveryWithResourceIdentity deliveryWithResourceIdentity = null, Azure.ResourceManager.EventGrid.Models.EventSubscriptionFilter filter = null, System.Collections.Generic.IEnumerable labels = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), Azure.ResourceManager.EventGrid.Models.EventDeliverySchema? eventDeliverySchema = default(Azure.ResourceManager.EventGrid.Models.EventDeliverySchema?), Azure.ResourceManager.EventGrid.Models.EventSubscriptionRetryPolicy retryPolicy = null, Azure.ResourceManager.EventGrid.Models.DeadLetterDestination deadLetterDestination = null, Azure.ResourceManager.EventGrid.Models.DeadLetterWithResourceIdentity deadLetterWithResourceIdentity = null) { throw null; } - public static Azure.ResourceManager.EventGrid.EventGridTopicData EventGridTopicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState?), System.Uri endpoint = null, Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo = null, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?), Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema = default(Azure.ResourceManager.EventGrid.Models.EventGridInputSchema?), Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess?), System.Collections.Generic.IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary = default(Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.EventGridTopicData EventGridTopicData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState? provisioningState, System.Uri endpoint, Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed, Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema, Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess, System.Collections.Generic.IEnumerable inboundIPRules, bool? isLocalAuthDisabled, Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary) { throw null; } + public static Azure.ResourceManager.EventGrid.EventGridTopicData EventGridTopicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EventGrid.Models.EventGridSku? skuName = default(Azure.ResourceManager.EventGrid.Models.EventGridSku?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.EventGrid.Models.ResourceKind? kind = default(Azure.ResourceManager.EventGrid.Models.ResourceKind?), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState?), System.Uri endpoint = null, Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo = null, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?), Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema = default(Azure.ResourceManager.EventGrid.Models.EventGridInputSchema?), Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess?), System.Collections.Generic.IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary = default(Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary?)) { throw null; } public static Azure.ResourceManager.EventGrid.Models.EventSubscriptionFullUri EventSubscriptionFullUri(System.Uri endpoint = null) { throw null; } public static Azure.ResourceManager.EventGrid.Models.EventTypeUnderTopic EventTypeUnderTopic(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string description = null, System.Uri schemaUri = null, bool? isInDefaultSet = default(bool?)) { throw null; } public static Azure.ResourceManager.EventGrid.ExtensionTopicData ExtensionTopicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string systemTopic = null) { throw null; } public static Azure.ResourceManager.EventGrid.Models.NamespaceSharedAccessKeys NamespaceSharedAccessKeys(string key1 = null, string key2 = null) { throw null; } public static Azure.ResourceManager.EventGrid.NamespaceTopicData NamespaceTopicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.NamespaceTopicProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.NamespaceTopicProvisioningState?), Azure.ResourceManager.EventGrid.Models.PublisherType? publisherType = default(Azure.ResourceManager.EventGrid.Models.PublisherType?), Azure.ResourceManager.EventGrid.Models.EventInputSchema? inputSchema = default(Azure.ResourceManager.EventGrid.Models.EventInputSchema?), int? eventRetentionInDays = default(int?)) { throw null; } - public static Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData NamespaceTopicEventSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState?), Azure.ResourceManager.EventGrid.Models.DeliveryConfiguration deliveryConfiguration = null, Azure.ResourceManager.EventGrid.Models.DeliverySchema? eventDeliverySchema = default(Azure.ResourceManager.EventGrid.Models.DeliverySchema?), Azure.ResourceManager.EventGrid.Models.FiltersConfiguration filtersConfiguration = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData NamespaceTopicEventSubscriptionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState? provisioningState, Azure.ResourceManager.EventGrid.Models.DeliveryConfiguration deliveryConfiguration, Azure.ResourceManager.EventGrid.Models.DeliverySchema? eventDeliverySchema, Azure.ResourceManager.EventGrid.Models.FiltersConfiguration filtersConfiguration, System.DateTimeOffset? expireOn) { throw null; } + public static Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData NamespaceTopicEventSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState?), Azure.ResourceManager.EventGrid.Models.DeliveryConfiguration deliveryConfiguration = null, Azure.ResourceManager.EventGrid.Models.DeliverySchema? eventDeliverySchema = default(Azure.ResourceManager.EventGrid.Models.DeliverySchema?), Azure.ResourceManager.EventGrid.Models.FiltersConfiguration filtersConfiguration = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData NetworkSecurityPerimeterConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState?), System.Collections.Generic.IEnumerable provisioningIssues = null, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterInfo networkSecurityPerimeter = null, Azure.ResourceManager.EventGrid.Models.ResourceAssociation resourceAssociation = null, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile profile = null) { throw null; } public static Azure.ResourceManager.EventGrid.PartnerConfigurationData PartnerConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EventGrid.Models.PartnerAuthorization partnerAuthorization = null, Azure.ResourceManager.EventGrid.Models.PartnerConfigurationProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerConfigurationProvisioningState?)) { throw null; } - public static Azure.ResourceManager.EventGrid.PartnerNamespaceChannelData PartnerNamespaceChannelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType? channelType = default(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType?), Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo partnerTopicInfo = null, string messageForActivation = null, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState?), Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState? readinessState = default(Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState?), System.DateTimeOffset? expireOnIfNotActivated = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.EventGrid.PartnerDestinationData PartnerDestinationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Guid? partnerRegistrationImmutableId = default(System.Guid?), string endpointServiceContext = null, System.DateTimeOffset? expirationTimeIfNotActivatedUtc = default(System.DateTimeOffset?), Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState?), Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState? activationState = default(Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState?), System.Uri endpointBaseUri = null, string messageForActivation = null) { throw null; } + public static Azure.ResourceManager.EventGrid.PartnerNamespaceChannelData PartnerNamespaceChannelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType? channelType = default(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType?), Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo partnerTopicInfo = null, Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo partnerDestinationInfo = null, string messageForActivation = null, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState?), Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState? readinessState = default(Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState?), System.DateTimeOffset? expireOnIfNotActivated = default(System.DateTimeOffset?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.PartnerNamespaceChannelData PartnerNamespaceChannelData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType? channelType, Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo partnerTopicInfo, string messageForActivation, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState? provisioningState, Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState? readinessState, System.DateTimeOffset? expireOnIfNotActivated) { throw null; } public static Azure.ResourceManager.EventGrid.PartnerNamespaceData PartnerNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceProvisioningState?), Azure.Core.ResourceIdentifier partnerRegistrationFullyQualifiedId = null, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?), System.Uri endpoint = null, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess?), System.Collections.Generic.IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.EventGrid.Models.PartnerTopicRoutingMode? partnerTopicRoutingMode = default(Azure.ResourceManager.EventGrid.Models.PartnerTopicRoutingMode?)) { throw null; } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceSharedAccessKeys PartnerNamespaceSharedAccessKeys(string key1 = null, string key2 = null) { throw null; } public static Azure.ResourceManager.EventGrid.PartnerRegistrationData PartnerRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EventGrid.Models.PartnerRegistrationProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerRegistrationProvisioningState?), System.Guid? partnerRegistrationImmutableId = default(System.Guid?)) { throw null; } @@ -1881,11 +2087,27 @@ public static partial class ArmEventGridModelFactory public static Azure.ResourceManager.EventGrid.Models.TopicsConfiguration TopicsConfiguration(string hostname = null, System.Collections.Generic.IEnumerable customDomains = null) { throw null; } public static Azure.ResourceManager.EventGrid.Models.TopicSharedAccessKeys TopicSharedAccessKeys(string key1 = null, string key2 = null) { throw null; } public static Azure.ResourceManager.EventGrid.TopicSpaceData TopicSpaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, System.Collections.Generic.IEnumerable topicTemplates = null, Azure.ResourceManager.EventGrid.Models.TopicSpaceProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.TopicSpaceProvisioningState?)) { throw null; } - public static Azure.ResourceManager.EventGrid.Models.TopicSpacesConfiguration TopicSpacesConfiguration(Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState? state = default(Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState?), string routeTopicResourceId = null, string hostname = null, Azure.ResourceManager.EventGrid.Models.RoutingEnrichments routingEnrichments = null, int? maximumSessionExpiryInHours = default(int?), int? maximumClientSessionsPerAuthenticationName = default(int?), Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo routingIdentityInfo = null, System.Collections.Generic.IEnumerable customDomains = null) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.TopicSpacesConfiguration TopicSpacesConfiguration(Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState? state = default(Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState?), string routeTopicResourceId = null, string hostname = null, Azure.ResourceManager.EventGrid.Models.RoutingEnrichments routingEnrichments = null, Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings clientAuthentication = null, int? maximumSessionExpiryInHours = default(int?), int? maximumClientSessionsPerAuthenticationName = default(int?), Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo routingIdentityInfo = null, System.Collections.Generic.IEnumerable customDomains = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.Models.TopicSpacesConfiguration TopicSpacesConfiguration(Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState? state, string routeTopicResourceId, string hostname, Azure.ResourceManager.EventGrid.Models.RoutingEnrichments routingEnrichments, int? maximumSessionExpiryInHours, int? maximumClientSessionsPerAuthenticationName, Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo routingIdentityInfo, System.Collections.Generic.IEnumerable customDomains) { throw null; } public static Azure.ResourceManager.EventGrid.TopicTypeData TopicTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provider = null, string displayName = null, string description = null, Azure.ResourceManager.EventGrid.Models.EventGridResourceRegionType? resourceRegionType = default(Azure.ResourceManager.EventGrid.Models.EventGridResourceRegionType?), Azure.ResourceManager.EventGrid.Models.TopicTypeProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.TopicTypeProvisioningState?), System.Collections.Generic.IEnumerable supportedLocations = null, string sourceResourceFormat = null, System.Collections.Generic.IEnumerable supportedScopesForSource = null, bool? areRegionalAndGlobalSourcesSupported = default(bool?), System.Collections.Generic.IEnumerable additionalEnforcedPermissions = null) { throw null; } - public static Azure.ResourceManager.EventGrid.VerifiedPartnerData VerifiedPartnerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? partnerRegistrationImmutableId = default(System.Guid?), string organizationName = null, string partnerDisplayName = null, Azure.ResourceManager.EventGrid.Models.PartnerDetails partnerTopicDetails = null, Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState?)) { throw null; } + public static Azure.ResourceManager.EventGrid.VerifiedPartnerData VerifiedPartnerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? partnerRegistrationImmutableId = default(System.Guid?), string organizationName = null, string partnerDisplayName = null, Azure.ResourceManager.EventGrid.Models.PartnerDetails partnerTopicDetails = null, Azure.ResourceManager.EventGrid.Models.PartnerDetails partnerDestinationDetails = null, Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.VerifiedPartnerData VerifiedPartnerData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Guid? partnerRegistrationImmutableId, string organizationName, string partnerDisplayName, Azure.ResourceManager.EventGrid.Models.PartnerDetails partnerTopicDetails, Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState? provisioningState) { throw null; } public static Azure.ResourceManager.EventGrid.Models.WebHookEventSubscriptionDestination WebHookEventSubscriptionDestination(System.Uri endpoint = null, System.Uri baseEndpoint = null, int? maxEventsPerBatch = default(int?), int? preferredBatchSizeInKilobytes = default(int?), System.Guid? azureActiveDirectoryTenantId = default(System.Guid?), string uriOrAzureActiveDirectoryApplicationId = null, System.Collections.Generic.IEnumerable deliveryAttributeMappings = null, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?)) { throw null; } } + public partial class AzureADPartnerClientAuthentication : Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureADPartnerClientAuthentication() { } + public System.Uri AzureActiveDirectoryApplicationIdOrUri { get { throw null; } set { } } + public string AzureActiveDirectoryTenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.AzureADPartnerClientAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.AzureADPartnerClientAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AzureFunctionEventSubscriptionDestination : Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AzureFunctionEventSubscriptionDestination() { } @@ -1945,6 +2167,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.ResourceManager.EventGrid.Models.CaCertificateProvisioningState left, Azure.ResourceManager.EventGrid.Models.CaCertificateProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class ClientAuthenticationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ClientAuthenticationSettings() { } + public System.Collections.Generic.IList AlternativeAuthenticationNameSources { get { throw null; } } + public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationSettings CustomJwtAuthentication { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.WebhookAuthenticationSettings WebhookAuthentication { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ClientCertificateAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClientCertificateAuthentication() { } @@ -2079,6 +2314,79 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EventGrid.Models.CustomDomainValidationState left, Azure.ResourceManager.EventGrid.Models.CustomDomainValidationState right) { throw null; } public override string ToString() { throw null; } } + public partial class CustomJwtAuthenticationManagedIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomJwtAuthenticationManagedIdentity(Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType identityType) { } + public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType IdentityType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CustomJwtAuthenticationManagedIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CustomJwtAuthenticationManagedIdentityType(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType left, Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType left, Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CustomJwtAuthenticationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomJwtAuthenticationSettings() { } + public System.Collections.Generic.IList EncodedIssuerCertificates { get { throw null; } } + public System.Collections.Generic.IList IssuerCertificates { get { throw null; } } + public string TokenIssuer { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomWebhookAuthenticationManagedIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomWebhookAuthenticationManagedIdentity(Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType identityType) { } + public Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType IdentityType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CustomWebhookAuthenticationManagedIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CustomWebhookAuthenticationManagedIdentityType(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType left, Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType left, Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DataResidencyBoundary : System.IEquatable { @@ -2235,6 +2543,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EncodedIssuerCertificateInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EncodedIssuerCertificateInfo(string kid, string encodedCertificate) { } + public string EncodedCertificate { get { throw null; } set { } } + public string Kid { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.EncodedIssuerCertificateInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.EncodedIssuerCertificateInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EventDefinitionKind : System.IEquatable { @@ -2283,6 +2603,7 @@ public EventGridDomainPatch() { } public bool? IsLocalAuthDisabled { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TlsVersion? MinimumTlsVersionAllowed { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridDomainPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2533,6 +2854,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public EventGridPublicNetworkAccess(string value) { throw null; } public static Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess Disabled { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess Enabled { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess SecuredByPerimeter { get { throw null; } } public bool Equals(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -2584,6 +2906,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EventGridSku : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EventGridSku(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.EventGridSku Basic { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.EventGridSku Premium { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.EventGridSku other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.EventGridSku left, Azure.ResourceManager.EventGrid.Models.EventGridSku right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.EventGridSku (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.EventGridSku left, Azure.ResourceManager.EventGrid.Models.EventGridSku right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EventGridSkuName : System.IEquatable { private readonly object _dummy; @@ -2629,6 +2969,7 @@ public EventGridTopicPatch() { } public bool? IsLocalAuthDisabled { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TlsVersion? MinimumTlsVersionAllowed { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridTopicPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2728,6 +3069,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class EventSubscriptionIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EventSubscriptionIdentity() { } + public System.Guid? FederatedClientId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionIdentityType? IdentityType { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2882,6 +3224,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class IssuerCertificateInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public IssuerCertificateInfo(System.Uri certificateUri) { } + public System.Uri CertificateUri { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentity Identity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.IssuerCertificateInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.IssuerCertificateInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class JsonFieldWithDefault : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public JsonFieldWithDefault() { } @@ -3007,6 +3361,7 @@ public NamespaceTopicEventSubscriptionPatch() { } public Azure.ResourceManager.EventGrid.Models.DeliverySchema? EventDeliverySchema { get { throw null; } set { } } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.FiltersConfiguration FiltersConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceTopicEventSubscriptionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3051,6 +3406,169 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NamespaceTopicProvisioningState left, Azure.ResourceManager.EventGrid.Models.NamespaceTopicProvisioningState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkSecurityPerimeterAssociationAccessMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkSecurityPerimeterAssociationAccessMode(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode Audit { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode Enforced { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode Learning { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkSecurityPerimeterConfigProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkSecurityPerimeterConfigProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NetworkSecurityPerimeterConfigurationIssues : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkSecurityPerimeterConfigurationIssues() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType? IssueType { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity? Severity { get { throw null; } set { } } + public System.Collections.Generic.IList SuggestedAccessRules { get { throw null; } } + public System.Collections.Generic.IList SuggestedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssues System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssues System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkSecurityPerimeterConfigurationIssueSeverity : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkSecurityPerimeterConfigurationIssueSeverity(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity Error { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkSecurityPerimeterConfigurationIssueType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkSecurityPerimeterConfigurationIssueType(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType ConfigurationPropagationFailure { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType MissingIdentityConfiguration { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType MissingPerimeterConfiguration { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType Other { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NetworkSecurityPerimeterConfigurationProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkSecurityPerimeterConfigurationProfile() { } + public System.Collections.Generic.IList AccessRules { get { throw null; } } + public string AccessRulesVersion { get { throw null; } set { } } + public string DiagnosticSettingsVersion { get { throw null; } set { } } + public System.Collections.Generic.IList EnabledLogCategories { get { throw null; } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetworkSecurityPerimeterInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkSecurityPerimeterInfo() { } + public string Id { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public string PerimeterGuid { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetworkSecurityPerimeterProfileAccessRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkSecurityPerimeterProfileAccessRule() { } + public System.Collections.Generic.IList AddressPrefixes { get { throw null; } } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection? Direction { get { throw null; } set { } } + public System.Collections.Generic.IList EmailAddresses { get { throw null; } } + public string FullyQualifiedArmId { get { throw null; } set { } } + public System.Collections.Generic.IList FullyQualifiedDomainNames { get { throw null; } } + public string Name { get { throw null; } set { } } + public string NetworkSecurityPerimeterProfileAccessRuleType { get { throw null; } set { } } + public System.Collections.Generic.IList NetworkSecurityPerimeters { get { throw null; } } + public System.Collections.Generic.IList PhoneNumbers { get { throw null; } } + public System.Collections.Generic.IList Subscriptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkSecurityPerimeterProfileAccessRuleDirection : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkSecurityPerimeterProfileAccessRuleDirection(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection Inbound { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection Outbound { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection right) { throw null; } + public override string ToString() { throw null; } + } public partial class NumberGreaterThanAdvancedFilter : Azure.ResourceManager.EventGrid.Models.AdvancedFilter, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NumberGreaterThanAdvancedFilter() { } @@ -3239,6 +3757,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class PartnerClientAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected PartnerClientAuthentication() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PartnerConfigurationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PartnerConfigurationPatch() { } @@ -3273,6 +3801,73 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EventGrid.Models.PartnerConfigurationProvisioningState left, Azure.ResourceManager.EventGrid.Models.PartnerConfigurationProvisioningState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PartnerDestinationActivationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PartnerDestinationActivationState(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState Activated { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState NeverActivated { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState left, Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState left, Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class PartnerDestinationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected PartnerDestinationInfo() { } + public string AzureSubscriptionId { get { throw null; } set { } } + public string EndpointServiceContext { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string ResourceGroupName { get { throw null; } set { } } + public System.Collections.Generic.IList ResourceMoveChangeHistory { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PartnerDestinationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PartnerDestinationPatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerDestinationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerDestinationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PartnerDestinationProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PartnerDestinationProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState IdleDueToMirroredChannelResourceDeletion { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState left, Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState left, Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } public partial class PartnerDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PartnerDetails() { } @@ -3286,11 +3881,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PartnerEventSubscriptionDestination : Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PartnerEventSubscriptionDestination() { } + public string ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PartnerNamespaceChannelPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PartnerNamespaceChannelPatch() { } public Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo EventTypeInfo { get { throw null; } set { } } public System.DateTimeOffset? ExpireOnIfNotActivated { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo PartnerDestinationInfo { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3308,6 +3915,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState Creating { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState Deleting { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState IdleDueToMirroredPartnerDestinationDeletion { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState IdleDueToMirroredPartnerTopicDeletion { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState Succeeded { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState Updating { get { throw null; } } @@ -3327,6 +3935,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public PartnerNamespaceChannelType(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType PartnerDestination { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType PartnerTopic { get { throw null; } } public bool Equals(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -3548,6 +4157,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EventGrid.Models.PartnerTopicRoutingMode left, Azure.ResourceManager.EventGrid.Models.PartnerTopicRoutingMode right) { throw null; } public override string ToString() { throw null; } } + public abstract partial class PartnerUpdateDestinationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected PartnerUpdateDestinationInfo() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PermissionBindingProvisioningState : System.IEquatable { @@ -3635,6 +4254,49 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ResourceAssociation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceAssociation() { } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode? AccessMode { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ResourceAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ResourceAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceKind(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.ResourceKind Azure { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.ResourceKind AzureArc { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.ResourceKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.ResourceKind left, Azure.ResourceManager.EventGrid.Models.ResourceKind right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.ResourceKind (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.ResourceKind left, Azure.ResourceManager.EventGrid.Models.ResourceKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ResourceMoveChangeHistory : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceMoveChangeHistory() { } + public string AzureSubscriptionId { get { throw null; } set { } } + public System.DateTimeOffset? ChangedTimeUtc { get { throw null; } set { } } + public string ResourceGroupName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ResourceMoveChangeHistory System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ResourceMoveChangeHistory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class RoutingEnrichments : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RoutingEnrichments() { } @@ -4067,6 +4729,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class TopicSpacesConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TopicSpacesConfiguration() { } + public Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings ClientAuthentication { get { throw null; } set { } } public System.Collections.Generic.IList CustomDomains { get { throw null; } } public string Hostname { get { throw null; } } public int? MaximumClientSessionsPerAuthenticationName { get { throw null; } set { } } @@ -4157,6 +4820,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class UpdateTopicSpacesConfigurationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public UpdateTopicSpacesConfigurationInfo() { } + public Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings ClientAuthentication { get { throw null; } set { } } public System.Collections.Generic.IList CustomDomains { get { throw null; } } public int? MaximumClientSessionsPerAuthenticationName { get { throw null; } set { } } public int? MaximumSessionExpiryInHours { get { throw null; } set { } } @@ -4193,6 +4857,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState left, Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class WebhookAuthenticationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebhookAuthenticationSettings(Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentity identity, System.Uri endpointUri, System.Uri azureActiveDirectoryApplicationIdOrUri, string azureActiveDirectoryTenantId) { } + public System.Uri AzureActiveDirectoryApplicationIdOrUri { get { throw null; } set { } } + public string AzureActiveDirectoryTenantId { get { throw null; } set { } } + public System.Uri EndpointBaseUri { get { throw null; } set { } } + public System.Uri EndpointUri { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentity Identity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookAuthenticationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookAuthenticationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class WebHookEventSubscriptionDestination : Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebHookEventSubscriptionDestination() { } @@ -4211,4 +4890,30 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class WebhookPartnerDestinationInfo : Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebhookPartnerDestinationInfo() { } + public Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication ClientAuthentication { get { throw null; } set { } } + public System.Uri EndpointBaseUri { get { throw null; } set { } } + public System.Uri EndpointUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookPartnerDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookPartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebhookUpdatePartnerDestinationInfo : Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebhookUpdatePartnerDestinationInfo() { } + public Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication ClientAuthentication { get { throw null; } set { } } + public System.Uri EndpointBaseUri { get { throw null; } set { } } + public System.Uri EndpointUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookUpdatePartnerDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookUpdatePartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs index a45b5c1a0266..7a6517ac5387 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs @@ -91,6 +91,38 @@ protected DomainEventSubscriptionResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.EventGridSubscriptionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.EventGridSubscriptionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class DomainNetworkSecurityPerimeterConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DomainNetworkSecurityPerimeterConfigurationCollection() { } + public virtual Azure.Response Exists(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DomainNetworkSecurityPerimeterConfigurationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DomainNetworkSecurityPerimeterConfigurationResource() { } + public virtual Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName, string perimeterGuid, string associationName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Reconcile(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ReconcileAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DomainTopicCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected DomainTopicCollection() { } @@ -216,6 +248,7 @@ public EventGridDomainData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridDomainData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -305,6 +338,9 @@ protected EventGridDomainResource() { } public virtual Azure.Response GetDomainEventSubscription(string eventSubscriptionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDomainEventSubscriptionAsync(string eventSubscriptionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EventGrid.DomainEventSubscriptionCollection GetDomainEventSubscriptions() { throw null; } + public virtual Azure.Response GetDomainNetworkSecurityPerimeterConfiguration(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDomainNetworkSecurityPerimeterConfigurationAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.EventGrid.DomainNetworkSecurityPerimeterConfigurationCollection GetDomainNetworkSecurityPerimeterConfigurations() { throw null; } public virtual Azure.Response GetDomainTopic(string domainTopicName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDomainTopicAsync(string domainTopicName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EventGrid.DomainTopicCollection GetDomainTopics() { throw null; } @@ -334,6 +370,7 @@ public static partial class EventGridExtensions { public static Azure.ResourceManager.EventGrid.CaCertificateResource GetCaCertificateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EventGrid.DomainEventSubscriptionResource GetDomainEventSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.EventGrid.DomainNetworkSecurityPerimeterConfigurationResource GetDomainNetworkSecurityPerimeterConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EventGrid.DomainTopicEventSubscriptionResource GetDomainTopicEventSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EventGrid.DomainTopicResource GetDomainTopicResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetEventGridDomain(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -380,6 +417,12 @@ public static partial class EventGridExtensions public static Azure.ResourceManager.EventGrid.PartnerConfigurationResource GetPartnerConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetPartnerConfigurations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetPartnerConfigurationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetPartnerDestination(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPartnerDestinationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.EventGrid.PartnerDestinationResource GetPartnerDestinationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.EventGrid.PartnerDestinationCollection GetPartnerDestinations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetPartnerDestinations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetPartnerDestinationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetPartnerNamespace(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string partnerNamespaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetPartnerNamespaceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string partnerNamespaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EventGrid.PartnerNamespaceChannelResource GetPartnerNamespaceChannelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -417,6 +460,7 @@ public static partial class EventGridExtensions public static Azure.Pageable GetSystemTopics(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetSystemTopicsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EventGrid.TopicEventSubscriptionResource GetTopicEventSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.EventGrid.TopicNetworkSecurityPerimeterConfigurationResource GetTopicNetworkSecurityPerimeterConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EventGrid.TopicSpaceResource GetTopicSpaceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetTopicType(this Azure.ResourceManager.Resources.TenantResource tenantResource, string topicTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetTopicTypeAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, string topicTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -773,16 +817,19 @@ public EventGridTopicData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? DataResidencyBoundary { get { throw null; } set { } } public System.Uri Endpoint { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo EventTypeInfo { get { throw null; } set { } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IList InboundIPRules { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? InputSchema { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping InputSchemaMapping { get { throw null; } set { } } public bool? IsLocalAuthDisabled { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.ResourceKind? Kind { get { throw null; } set { } } public string MetricResourceId { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.TlsVersion? MinimumTlsVersionAllowed { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridTopicData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -880,6 +927,9 @@ protected EventGridTopicResource() { } public virtual Azure.Response GetTopicEventSubscription(string eventSubscriptionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetTopicEventSubscriptionAsync(string eventSubscriptionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EventGrid.TopicEventSubscriptionCollection GetTopicEventSubscriptions() { throw null; } + public virtual Azure.Response GetTopicNetworkSecurityPerimeterConfiguration(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTopicNetworkSecurityPerimeterConfigurationAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.EventGrid.TopicNetworkSecurityPerimeterConfigurationCollection GetTopicNetworkSecurityPerimeterConfigurations() { throw null; } public virtual Azure.ResourceManager.ArmOperation RegenerateKey(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.TopicRegenerateKeyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RegenerateKeyAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.TopicRegenerateKeyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1017,6 +1067,7 @@ public NamespaceTopicEventSubscriptionData() { } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.FiltersConfiguration FiltersConfiguration { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1030,6 +1081,8 @@ public partial class NamespaceTopicEventSubscriptionResource : Azure.ResourceMan protected NamespaceTopicEventSubscriptionResource() { } public virtual Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string namespaceName, string topicName, string eventSubscriptionName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1039,6 +1092,10 @@ protected NamespaceTopicEventSubscriptionResource() { } public virtual Azure.AsyncPageable GetDeliveryAttributesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetFullUri(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetFullUriAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1073,6 +1130,21 @@ protected NamespaceTopicResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.NamespaceTopicPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.NamespaceTopicPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class NetworkSecurityPerimeterConfigurationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkSecurityPerimeterConfigurationData() { } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterInfo NetworkSecurityPerimeter { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile Profile { get { throw null; } set { } } + public System.Collections.Generic.IList ProvisioningIssues { get { throw null; } } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState? ProvisioningState { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.ResourceAssociation ResourceAssociation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PartnerConfigurationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PartnerConfigurationData(Azure.Core.AzureLocation location) { } @@ -1116,6 +1188,67 @@ protected PartnerConfigurationResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.PartnerConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.PartnerConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class PartnerDestinationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PartnerDestinationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string partnerDestinationName, Azure.ResourceManager.EventGrid.PartnerDestinationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string partnerDestinationName, Azure.ResourceManager.EventGrid.PartnerDestinationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class PartnerDestinationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PartnerDestinationData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState? ActivationState { get { throw null; } set { } } + public System.Uri EndpointBaseUri { get { throw null; } set { } } + public string EndpointServiceContext { get { throw null; } set { } } + public System.DateTimeOffset? ExpirationTimeIfNotActivatedUtc { get { throw null; } set { } } + public string MessageForActivation { get { throw null; } set { } } + public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.PartnerDestinationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.PartnerDestinationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PartnerDestinationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PartnerDestinationResource() { } + public virtual Azure.ResourceManager.EventGrid.PartnerDestinationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response Activate(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ActivateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string partnerDestinationName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.EventGrid.PartnerDestinationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.PartnerDestinationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.PartnerDestinationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.PartnerDestinationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class PartnerNamespaceChannelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected PartnerNamespaceChannelCollection() { } @@ -1139,6 +1272,7 @@ public PartnerNamespaceChannelData() { } public Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType? ChannelType { get { throw null; } set { } } public System.DateTimeOffset? ExpireOnIfNotActivated { get { throw null; } set { } } public string MessageForActivation { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo PartnerDestinationInfo { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo PartnerTopicInfo { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState? ReadinessState { get { throw null; } set { } } @@ -1576,6 +1710,38 @@ protected TopicEventSubscriptionResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.EventGridSubscriptionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.EventGrid.Models.EventGridSubscriptionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class TopicNetworkSecurityPerimeterConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TopicNetworkSecurityPerimeterConfigurationCollection() { } + public virtual Azure.Response Exists(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string perimeterGuid, string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class TopicNetworkSecurityPerimeterConfigurationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected TopicNetworkSecurityPerimeterConfigurationResource() { } + public virtual Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName, string perimeterGuid, string associationName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Reconcile(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ReconcileAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class TopicSpaceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected TopicSpaceCollection() { } @@ -1696,6 +1862,7 @@ public partial class VerifiedPartnerData : Azure.ResourceManager.Models.Resource { public VerifiedPartnerData() { } public string OrganizationName { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.PartnerDetails PartnerDestinationDetails { get { throw null; } set { } } public string PartnerDisplayName { get { throw null; } set { } } public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerDetails PartnerTopicDetails { get { throw null; } set { } } @@ -1730,6 +1897,7 @@ public partial class MockableEventGridArmClient : Azure.ResourceManager.ArmResou protected MockableEventGridArmClient() { } public virtual Azure.ResourceManager.EventGrid.CaCertificateResource GetCaCertificateResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.DomainEventSubscriptionResource GetDomainEventSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.EventGrid.DomainNetworkSecurityPerimeterConfigurationResource GetDomainNetworkSecurityPerimeterConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.DomainTopicEventSubscriptionResource GetDomainTopicEventSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.DomainTopicResource GetDomainTopicResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.EventGridDomainPrivateEndpointConnectionResource GetEventGridDomainPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1754,6 +1922,7 @@ protected MockableEventGridArmClient() { } public virtual Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionResource GetNamespaceTopicEventSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.NamespaceTopicResource GetNamespaceTopicResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerConfigurationResource GetPartnerConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.EventGrid.PartnerDestinationResource GetPartnerDestinationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerNamespaceChannelResource GetPartnerNamespaceChannelResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerNamespacePrivateLinkResource GetPartnerNamespacePrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerNamespaceResource GetPartnerNamespaceResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1763,6 +1932,7 @@ protected MockableEventGridArmClient() { } public virtual Azure.ResourceManager.EventGrid.SystemTopicEventSubscriptionResource GetSystemTopicEventSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.SystemTopicResource GetSystemTopicResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.TopicEventSubscriptionResource GetTopicEventSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.EventGrid.TopicNetworkSecurityPerimeterConfigurationResource GetTopicNetworkSecurityPerimeterConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.TopicSpaceResource GetTopicSpaceResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.TopicTypeResource GetTopicTypeResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.EventGrid.VerifiedPartnerResource GetVerifiedPartnerResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1782,6 +1952,9 @@ protected MockableEventGridResourceGroupResource() { } public virtual Azure.Pageable GetGlobalEventSubscriptionsDataForTopicType(string topicTypeName, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetGlobalEventSubscriptionsDataForTopicTypeAsync(string topicTypeName, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerConfigurationResource GetPartnerConfiguration() { throw null; } + public virtual Azure.Response GetPartnerDestination(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPartnerDestinationAsync(string partnerDestinationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.EventGrid.PartnerDestinationCollection GetPartnerDestinations() { throw null; } public virtual Azure.Response GetPartnerNamespace(string partnerNamespaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetPartnerNamespaceAsync(string partnerNamespaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EventGrid.PartnerNamespaceCollection GetPartnerNamespaces() { throw null; } @@ -1812,6 +1985,8 @@ protected MockableEventGridSubscriptionResource() { } public virtual Azure.AsyncPageable GetGlobalEventSubscriptionsDataForTopicTypeAsync(string topicTypeName, string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPartnerConfigurations(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPartnerConfigurationsAsync(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetPartnerDestinations(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPartnerDestinationsAsync(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPartnerNamespaces(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPartnerNamespacesAsync(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPartnerRegistrations(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1849,12 +2024,35 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AlternativeAuthenticationNameSource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AlternativeAuthenticationNameSource(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource ClientCertificateDns { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource ClientCertificateEmail { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource ClientCertificateIP { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource ClientCertificateSubject { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource ClientCertificateUri { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource left, Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource left, Azure.ResourceManager.EventGrid.Models.AlternativeAuthenticationNameSource right) { throw null; } + public override string ToString() { throw null; } + } public static partial class ArmEventGridModelFactory { public static Azure.ResourceManager.EventGrid.CaCertificateData CaCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string encodedCertificate = null, System.DateTimeOffset? issueTimeInUtc = default(System.DateTimeOffset?), System.DateTimeOffset? expiryTimeInUtc = default(System.DateTimeOffset?), Azure.ResourceManager.EventGrid.Models.CaCertificateProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.CaCertificateProvisioningState?)) { throw null; } public static Azure.ResourceManager.EventGrid.Models.CustomDomainOwnershipValidationResult CustomDomainOwnershipValidationResult(System.Collections.Generic.IEnumerable customDomainsForTopicsConfiguration = null, System.Collections.Generic.IEnumerable customDomainsForTopicSpacesConfiguration = null) { throw null; } public static Azure.ResourceManager.EventGrid.DomainTopicData DomainTopicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.DomainTopicProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.DomainTopicProvisioningState?)) { throw null; } - public static Azure.ResourceManager.EventGrid.EventGridDomainData EventGridDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState?), Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?), System.Uri endpoint = null, Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema = default(Azure.ResourceManager.EventGrid.Models.EventGridInputSchema?), Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo = null, Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess?), System.Collections.Generic.IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = default(bool?), bool? autoCreateTopicWithFirstSubscription = default(bool?), bool? autoDeleteTopicWithLastSubscription = default(bool?), Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary = default(Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.EventGridDomainData EventGridDomainData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState? provisioningState, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed, System.Uri endpoint, Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema, Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo, Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess, System.Collections.Generic.IEnumerable inboundIPRules, bool? isLocalAuthDisabled, bool? autoCreateTopicWithFirstSubscription, bool? autoDeleteTopicWithLastSubscription, Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary) { throw null; } + public static Azure.ResourceManager.EventGrid.EventGridDomainData EventGridDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EventGrid.Models.EventGridSku? skuName = default(Azure.ResourceManager.EventGrid.Models.EventGridSku?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState?), Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?), System.Uri endpoint = null, Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema = default(Azure.ResourceManager.EventGrid.Models.EventGridInputSchema?), Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo = null, Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess?), System.Collections.Generic.IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = default(bool?), bool? autoCreateTopicWithFirstSubscription = default(bool?), bool? autoDeleteTopicWithLastSubscription = default(bool?), Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary = default(Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary?)) { throw null; } public static Azure.ResourceManager.EventGrid.Models.EventGridDomainSharedAccessKeys EventGridDomainSharedAccessKeys(string key1 = null, string key2 = null) { throw null; } public static Azure.ResourceManager.EventGrid.EventGridNamespaceClientData EventGridNamespaceClientData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string authenticationName = null, Azure.ResourceManager.EventGrid.Models.ClientCertificateAuthentication clientCertificateAuthentication = null, Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientState? state = default(Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientState?), System.Collections.Generic.IDictionary attributes = null, Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientProvisioningState?)) { throw null; } public static Azure.ResourceManager.EventGrid.EventGridNamespaceClientGroupData EventGridNamespaceClientGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string query = null, Azure.ResourceManager.EventGrid.Models.ClientGroupProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.ClientGroupProvisioningState?)) { throw null; } @@ -1863,15 +2061,23 @@ public static partial class ArmEventGridModelFactory public static Azure.ResourceManager.EventGrid.EventGridPrivateEndpointConnectionData EventGridPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.ResourceManager.EventGrid.Models.EventGridPrivateEndpointConnectionState connectionState = null, Azure.ResourceManager.EventGrid.Models.EventGridResourceProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridResourceProvisioningState?)) { throw null; } public static Azure.ResourceManager.EventGrid.EventGridPrivateLinkResourceData EventGridPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, string displayName = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } public static Azure.ResourceManager.EventGrid.EventGridSubscriptionData EventGridSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string topic = null, Azure.ResourceManager.EventGrid.Models.EventSubscriptionProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventSubscriptionProvisioningState?), Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination destination = null, Azure.ResourceManager.EventGrid.Models.DeliveryWithResourceIdentity deliveryWithResourceIdentity = null, Azure.ResourceManager.EventGrid.Models.EventSubscriptionFilter filter = null, System.Collections.Generic.IEnumerable labels = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), Azure.ResourceManager.EventGrid.Models.EventDeliverySchema? eventDeliverySchema = default(Azure.ResourceManager.EventGrid.Models.EventDeliverySchema?), Azure.ResourceManager.EventGrid.Models.EventSubscriptionRetryPolicy retryPolicy = null, Azure.ResourceManager.EventGrid.Models.DeadLetterDestination deadLetterDestination = null, Azure.ResourceManager.EventGrid.Models.DeadLetterWithResourceIdentity deadLetterWithResourceIdentity = null) { throw null; } - public static Azure.ResourceManager.EventGrid.EventGridTopicData EventGridTopicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState?), System.Uri endpoint = null, Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo = null, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?), Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema = default(Azure.ResourceManager.EventGrid.Models.EventGridInputSchema?), Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess?), System.Collections.Generic.IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary = default(Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.EventGridTopicData EventGridTopicData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState? provisioningState, System.Uri endpoint, Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed, Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema, Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess, System.Collections.Generic.IEnumerable inboundIPRules, bool? isLocalAuthDisabled, Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary) { throw null; } + public static Azure.ResourceManager.EventGrid.EventGridTopicData EventGridTopicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EventGrid.Models.EventGridSku? skuName = default(Azure.ResourceManager.EventGrid.Models.EventGridSku?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.EventGrid.Models.ResourceKind? kind = default(Azure.ResourceManager.EventGrid.Models.ResourceKind?), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState?), System.Uri endpoint = null, Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo eventTypeInfo = null, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?), Azure.ResourceManager.EventGrid.Models.EventGridInputSchema? inputSchema = default(Azure.ResourceManager.EventGrid.Models.EventGridInputSchema?), Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess?), System.Collections.Generic.IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary? dataResidencyBoundary = default(Azure.ResourceManager.EventGrid.Models.DataResidencyBoundary?)) { throw null; } public static Azure.ResourceManager.EventGrid.Models.EventSubscriptionFullUri EventSubscriptionFullUri(System.Uri endpoint = null) { throw null; } public static Azure.ResourceManager.EventGrid.Models.EventTypeUnderTopic EventTypeUnderTopic(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string description = null, System.Uri schemaUri = null, bool? isInDefaultSet = default(bool?)) { throw null; } public static Azure.ResourceManager.EventGrid.ExtensionTopicData ExtensionTopicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string systemTopic = null) { throw null; } public static Azure.ResourceManager.EventGrid.Models.NamespaceSharedAccessKeys NamespaceSharedAccessKeys(string key1 = null, string key2 = null) { throw null; } public static Azure.ResourceManager.EventGrid.NamespaceTopicData NamespaceTopicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.NamespaceTopicProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.NamespaceTopicProvisioningState?), Azure.ResourceManager.EventGrid.Models.PublisherType? publisherType = default(Azure.ResourceManager.EventGrid.Models.PublisherType?), Azure.ResourceManager.EventGrid.Models.EventInputSchema? inputSchema = default(Azure.ResourceManager.EventGrid.Models.EventInputSchema?), int? eventRetentionInDays = default(int?)) { throw null; } - public static Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData NamespaceTopicEventSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState?), Azure.ResourceManager.EventGrid.Models.DeliveryConfiguration deliveryConfiguration = null, Azure.ResourceManager.EventGrid.Models.DeliverySchema? eventDeliverySchema = default(Azure.ResourceManager.EventGrid.Models.DeliverySchema?), Azure.ResourceManager.EventGrid.Models.FiltersConfiguration filtersConfiguration = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData NamespaceTopicEventSubscriptionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState? provisioningState, Azure.ResourceManager.EventGrid.Models.DeliveryConfiguration deliveryConfiguration, Azure.ResourceManager.EventGrid.Models.DeliverySchema? eventDeliverySchema, Azure.ResourceManager.EventGrid.Models.FiltersConfiguration filtersConfiguration, System.DateTimeOffset? expireOn) { throw null; } + public static Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData NamespaceTopicEventSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState?), Azure.ResourceManager.EventGrid.Models.DeliveryConfiguration deliveryConfiguration = null, Azure.ResourceManager.EventGrid.Models.DeliverySchema? eventDeliverySchema = default(Azure.ResourceManager.EventGrid.Models.DeliverySchema?), Azure.ResourceManager.EventGrid.Models.FiltersConfiguration filtersConfiguration = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData NetworkSecurityPerimeterConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState?), System.Collections.Generic.IEnumerable provisioningIssues = null, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterInfo networkSecurityPerimeter = null, Azure.ResourceManager.EventGrid.Models.ResourceAssociation resourceAssociation = null, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile profile = null) { throw null; } public static Azure.ResourceManager.EventGrid.PartnerConfigurationData PartnerConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EventGrid.Models.PartnerAuthorization partnerAuthorization = null, Azure.ResourceManager.EventGrid.Models.PartnerConfigurationProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerConfigurationProvisioningState?)) { throw null; } - public static Azure.ResourceManager.EventGrid.PartnerNamespaceChannelData PartnerNamespaceChannelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType? channelType = default(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType?), Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo partnerTopicInfo = null, string messageForActivation = null, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState?), Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState? readinessState = default(Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState?), System.DateTimeOffset? expireOnIfNotActivated = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.EventGrid.PartnerDestinationData PartnerDestinationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Guid? partnerRegistrationImmutableId = default(System.Guid?), string endpointServiceContext = null, System.DateTimeOffset? expirationTimeIfNotActivatedUtc = default(System.DateTimeOffset?), Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState?), Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState? activationState = default(Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState?), System.Uri endpointBaseUri = null, string messageForActivation = null) { throw null; } + public static Azure.ResourceManager.EventGrid.PartnerNamespaceChannelData PartnerNamespaceChannelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType? channelType = default(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType?), Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo partnerTopicInfo = null, Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo partnerDestinationInfo = null, string messageForActivation = null, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState?), Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState? readinessState = default(Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState?), System.DateTimeOffset? expireOnIfNotActivated = default(System.DateTimeOffset?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.PartnerNamespaceChannelData PartnerNamespaceChannelData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType? channelType, Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo partnerTopicInfo, string messageForActivation, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState? provisioningState, Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState? readinessState, System.DateTimeOffset? expireOnIfNotActivated) { throw null; } public static Azure.ResourceManager.EventGrid.PartnerNamespaceData PartnerNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.EventGrid.Models.PartnerNamespaceProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceProvisioningState?), Azure.Core.ResourceIdentifier partnerRegistrationFullyQualifiedId = null, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?), System.Uri endpoint = null, Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess?), System.Collections.Generic.IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.EventGrid.Models.PartnerTopicRoutingMode? partnerTopicRoutingMode = default(Azure.ResourceManager.EventGrid.Models.PartnerTopicRoutingMode?)) { throw null; } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceSharedAccessKeys PartnerNamespaceSharedAccessKeys(string key1 = null, string key2 = null) { throw null; } public static Azure.ResourceManager.EventGrid.PartnerRegistrationData PartnerRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EventGrid.Models.PartnerRegistrationProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.PartnerRegistrationProvisioningState?), System.Guid? partnerRegistrationImmutableId = default(System.Guid?)) { throw null; } @@ -1881,11 +2087,27 @@ public static partial class ArmEventGridModelFactory public static Azure.ResourceManager.EventGrid.Models.TopicsConfiguration TopicsConfiguration(string hostname = null, System.Collections.Generic.IEnumerable customDomains = null) { throw null; } public static Azure.ResourceManager.EventGrid.Models.TopicSharedAccessKeys TopicSharedAccessKeys(string key1 = null, string key2 = null) { throw null; } public static Azure.ResourceManager.EventGrid.TopicSpaceData TopicSpaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, System.Collections.Generic.IEnumerable topicTemplates = null, Azure.ResourceManager.EventGrid.Models.TopicSpaceProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.TopicSpaceProvisioningState?)) { throw null; } - public static Azure.ResourceManager.EventGrid.Models.TopicSpacesConfiguration TopicSpacesConfiguration(Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState? state = default(Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState?), string routeTopicResourceId = null, string hostname = null, Azure.ResourceManager.EventGrid.Models.RoutingEnrichments routingEnrichments = null, int? maximumSessionExpiryInHours = default(int?), int? maximumClientSessionsPerAuthenticationName = default(int?), Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo routingIdentityInfo = null, System.Collections.Generic.IEnumerable customDomains = null) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.TopicSpacesConfiguration TopicSpacesConfiguration(Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState? state = default(Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState?), string routeTopicResourceId = null, string hostname = null, Azure.ResourceManager.EventGrid.Models.RoutingEnrichments routingEnrichments = null, Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings clientAuthentication = null, int? maximumSessionExpiryInHours = default(int?), int? maximumClientSessionsPerAuthenticationName = default(int?), Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo routingIdentityInfo = null, System.Collections.Generic.IEnumerable customDomains = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.Models.TopicSpacesConfiguration TopicSpacesConfiguration(Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState? state, string routeTopicResourceId, string hostname, Azure.ResourceManager.EventGrid.Models.RoutingEnrichments routingEnrichments, int? maximumSessionExpiryInHours, int? maximumClientSessionsPerAuthenticationName, Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo routingIdentityInfo, System.Collections.Generic.IEnumerable customDomains) { throw null; } public static Azure.ResourceManager.EventGrid.TopicTypeData TopicTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provider = null, string displayName = null, string description = null, Azure.ResourceManager.EventGrid.Models.EventGridResourceRegionType? resourceRegionType = default(Azure.ResourceManager.EventGrid.Models.EventGridResourceRegionType?), Azure.ResourceManager.EventGrid.Models.TopicTypeProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.TopicTypeProvisioningState?), System.Collections.Generic.IEnumerable supportedLocations = null, string sourceResourceFormat = null, System.Collections.Generic.IEnumerable supportedScopesForSource = null, bool? areRegionalAndGlobalSourcesSupported = default(bool?), System.Collections.Generic.IEnumerable additionalEnforcedPermissions = null) { throw null; } - public static Azure.ResourceManager.EventGrid.VerifiedPartnerData VerifiedPartnerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? partnerRegistrationImmutableId = default(System.Guid?), string organizationName = null, string partnerDisplayName = null, Azure.ResourceManager.EventGrid.Models.PartnerDetails partnerTopicDetails = null, Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState?)) { throw null; } + public static Azure.ResourceManager.EventGrid.VerifiedPartnerData VerifiedPartnerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? partnerRegistrationImmutableId = default(System.Guid?), string organizationName = null, string partnerDisplayName = null, Azure.ResourceManager.EventGrid.Models.PartnerDetails partnerTopicDetails = null, Azure.ResourceManager.EventGrid.Models.PartnerDetails partnerDestinationDetails = null, Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState? provisioningState = default(Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EventGrid.VerifiedPartnerData VerifiedPartnerData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Guid? partnerRegistrationImmutableId, string organizationName, string partnerDisplayName, Azure.ResourceManager.EventGrid.Models.PartnerDetails partnerTopicDetails, Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState? provisioningState) { throw null; } public static Azure.ResourceManager.EventGrid.Models.WebHookEventSubscriptionDestination WebHookEventSubscriptionDestination(System.Uri endpoint = null, System.Uri baseEndpoint = null, int? maxEventsPerBatch = default(int?), int? preferredBatchSizeInKilobytes = default(int?), System.Guid? azureActiveDirectoryTenantId = default(System.Guid?), string uriOrAzureActiveDirectoryApplicationId = null, System.Collections.Generic.IEnumerable deliveryAttributeMappings = null, Azure.ResourceManager.EventGrid.Models.TlsVersion? minimumTlsVersionAllowed = default(Azure.ResourceManager.EventGrid.Models.TlsVersion?)) { throw null; } } + public partial class AzureADPartnerClientAuthentication : Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureADPartnerClientAuthentication() { } + public System.Uri AzureActiveDirectoryApplicationIdOrUri { get { throw null; } set { } } + public string AzureActiveDirectoryTenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.AzureADPartnerClientAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.AzureADPartnerClientAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AzureFunctionEventSubscriptionDestination : Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AzureFunctionEventSubscriptionDestination() { } @@ -1945,6 +2167,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.ResourceManager.EventGrid.Models.CaCertificateProvisioningState left, Azure.ResourceManager.EventGrid.Models.CaCertificateProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class ClientAuthenticationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ClientAuthenticationSettings() { } + public System.Collections.Generic.IList AlternativeAuthenticationNameSources { get { throw null; } } + public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationSettings CustomJwtAuthentication { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.WebhookAuthenticationSettings WebhookAuthentication { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ClientCertificateAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClientCertificateAuthentication() { } @@ -2079,6 +2314,79 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EventGrid.Models.CustomDomainValidationState left, Azure.ResourceManager.EventGrid.Models.CustomDomainValidationState right) { throw null; } public override string ToString() { throw null; } } + public partial class CustomJwtAuthenticationManagedIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomJwtAuthenticationManagedIdentity(Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType identityType) { } + public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType IdentityType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CustomJwtAuthenticationManagedIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CustomJwtAuthenticationManagedIdentityType(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType left, Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType left, Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CustomJwtAuthenticationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomJwtAuthenticationSettings() { } + public System.Collections.Generic.IList EncodedIssuerCertificates { get { throw null; } } + public System.Collections.Generic.IList IssuerCertificates { get { throw null; } } + public string TokenIssuer { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomWebhookAuthenticationManagedIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomWebhookAuthenticationManagedIdentity(Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType identityType) { } + public Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType IdentityType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CustomWebhookAuthenticationManagedIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CustomWebhookAuthenticationManagedIdentityType(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType left, Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType left, Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentityType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DataResidencyBoundary : System.IEquatable { @@ -2235,6 +2543,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EncodedIssuerCertificateInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EncodedIssuerCertificateInfo(string kid, string encodedCertificate) { } + public string EncodedCertificate { get { throw null; } set { } } + public string Kid { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.EncodedIssuerCertificateInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.EncodedIssuerCertificateInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EventDefinitionKind : System.IEquatable { @@ -2283,6 +2603,7 @@ public EventGridDomainPatch() { } public bool? IsLocalAuthDisabled { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TlsVersion? MinimumTlsVersionAllowed { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridDomainPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2533,6 +2854,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public EventGridPublicNetworkAccess(string value) { throw null; } public static Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess Disabled { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess Enabled { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess SecuredByPerimeter { get { throw null; } } public bool Equals(Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -2584,6 +2906,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EventGridSku : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EventGridSku(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.EventGridSku Basic { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.EventGridSku Premium { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.EventGridSku other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.EventGridSku left, Azure.ResourceManager.EventGrid.Models.EventGridSku right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.EventGridSku (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.EventGridSku left, Azure.ResourceManager.EventGrid.Models.EventGridSku right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EventGridSkuName : System.IEquatable { private readonly object _dummy; @@ -2629,6 +2969,7 @@ public EventGridTopicPatch() { } public bool? IsLocalAuthDisabled { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TlsVersion? MinimumTlsVersionAllowed { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridTopicPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2728,6 +3069,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class EventSubscriptionIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EventSubscriptionIdentity() { } + public System.Guid? FederatedClientId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionIdentityType? IdentityType { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2882,6 +3224,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class IssuerCertificateInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public IssuerCertificateInfo(System.Uri certificateUri) { } + public System.Uri CertificateUri { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentity Identity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.IssuerCertificateInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.IssuerCertificateInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class JsonFieldWithDefault : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public JsonFieldWithDefault() { } @@ -3007,6 +3361,7 @@ public NamespaceTopicEventSubscriptionPatch() { } public Azure.ResourceManager.EventGrid.Models.DeliverySchema? EventDeliverySchema { get { throw null; } set { } } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.FiltersConfiguration FiltersConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceTopicEventSubscriptionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3051,6 +3406,169 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NamespaceTopicProvisioningState left, Azure.ResourceManager.EventGrid.Models.NamespaceTopicProvisioningState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkSecurityPerimeterAssociationAccessMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkSecurityPerimeterAssociationAccessMode(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode Audit { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode Enforced { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode Learning { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkSecurityPerimeterConfigProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkSecurityPerimeterConfigProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NetworkSecurityPerimeterConfigurationIssues : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkSecurityPerimeterConfigurationIssues() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType? IssueType { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity? Severity { get { throw null; } set { } } + public System.Collections.Generic.IList SuggestedAccessRules { get { throw null; } } + public System.Collections.Generic.IList SuggestedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssues System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssues System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkSecurityPerimeterConfigurationIssueSeverity : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkSecurityPerimeterConfigurationIssueSeverity(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity Error { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkSecurityPerimeterConfigurationIssueType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkSecurityPerimeterConfigurationIssueType(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType ConfigurationPropagationFailure { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType MissingIdentityConfiguration { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType MissingPerimeterConfiguration { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType Other { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NetworkSecurityPerimeterConfigurationProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkSecurityPerimeterConfigurationProfile() { } + public System.Collections.Generic.IList AccessRules { get { throw null; } } + public string AccessRulesVersion { get { throw null; } set { } } + public string DiagnosticSettingsVersion { get { throw null; } set { } } + public System.Collections.Generic.IList EnabledLogCategories { get { throw null; } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetworkSecurityPerimeterInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkSecurityPerimeterInfo() { } + public string Id { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public string PerimeterGuid { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetworkSecurityPerimeterProfileAccessRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkSecurityPerimeterProfileAccessRule() { } + public System.Collections.Generic.IList AddressPrefixes { get { throw null; } } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection? Direction { get { throw null; } set { } } + public System.Collections.Generic.IList EmailAddresses { get { throw null; } } + public string FullyQualifiedArmId { get { throw null; } set { } } + public System.Collections.Generic.IList FullyQualifiedDomainNames { get { throw null; } } + public string Name { get { throw null; } set { } } + public string NetworkSecurityPerimeterProfileAccessRuleType { get { throw null; } set { } } + public System.Collections.Generic.IList NetworkSecurityPerimeters { get { throw null; } } + public System.Collections.Generic.IList PhoneNumbers { get { throw null; } } + public System.Collections.Generic.IList Subscriptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkSecurityPerimeterProfileAccessRuleDirection : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkSecurityPerimeterProfileAccessRuleDirection(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection Inbound { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection Outbound { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection left, Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRuleDirection right) { throw null; } + public override string ToString() { throw null; } + } public partial class NumberGreaterThanAdvancedFilter : Azure.ResourceManager.EventGrid.Models.AdvancedFilter, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NumberGreaterThanAdvancedFilter() { } @@ -3239,6 +3757,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class PartnerClientAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected PartnerClientAuthentication() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PartnerConfigurationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PartnerConfigurationPatch() { } @@ -3273,6 +3801,73 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EventGrid.Models.PartnerConfigurationProvisioningState left, Azure.ResourceManager.EventGrid.Models.PartnerConfigurationProvisioningState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PartnerDestinationActivationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PartnerDestinationActivationState(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState Activated { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState NeverActivated { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState left, Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState left, Azure.ResourceManager.EventGrid.Models.PartnerDestinationActivationState right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class PartnerDestinationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected PartnerDestinationInfo() { } + public string AzureSubscriptionId { get { throw null; } set { } } + public string EndpointServiceContext { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string ResourceGroupName { get { throw null; } set { } } + public System.Collections.Generic.IList ResourceMoveChangeHistory { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PartnerDestinationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PartnerDestinationPatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerDestinationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerDestinationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PartnerDestinationProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PartnerDestinationProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState IdleDueToMirroredChannelResourceDeletion { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState left, Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState left, Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } public partial class PartnerDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PartnerDetails() { } @@ -3286,11 +3881,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PartnerEventSubscriptionDestination : Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PartnerEventSubscriptionDestination() { } + public string ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PartnerNamespaceChannelPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PartnerNamespaceChannelPatch() { } public Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo EventTypeInfo { get { throw null; } set { } } public System.DateTimeOffset? ExpireOnIfNotActivated { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo PartnerDestinationInfo { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3308,6 +3915,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState Creating { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState Deleting { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState IdleDueToMirroredPartnerDestinationDeletion { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState IdleDueToMirroredPartnerTopicDeletion { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState Succeeded { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState Updating { get { throw null; } } @@ -3327,6 +3935,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public PartnerNamespaceChannelType(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType PartnerDestination { get { throw null; } } public static Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType PartnerTopic { get { throw null; } } public bool Equals(Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -3548,6 +4157,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EventGrid.Models.PartnerTopicRoutingMode left, Azure.ResourceManager.EventGrid.Models.PartnerTopicRoutingMode right) { throw null; } public override string ToString() { throw null; } } + public abstract partial class PartnerUpdateDestinationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected PartnerUpdateDestinationInfo() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PermissionBindingProvisioningState : System.IEquatable { @@ -3635,6 +4254,49 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ResourceAssociation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceAssociation() { } + public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode? AccessMode { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ResourceAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ResourceAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceKind(string value) { throw null; } + public static Azure.ResourceManager.EventGrid.Models.ResourceKind Azure { get { throw null; } } + public static Azure.ResourceManager.EventGrid.Models.ResourceKind AzureArc { get { throw null; } } + public bool Equals(Azure.ResourceManager.EventGrid.Models.ResourceKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EventGrid.Models.ResourceKind left, Azure.ResourceManager.EventGrid.Models.ResourceKind right) { throw null; } + public static implicit operator Azure.ResourceManager.EventGrid.Models.ResourceKind (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EventGrid.Models.ResourceKind left, Azure.ResourceManager.EventGrid.Models.ResourceKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ResourceMoveChangeHistory : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceMoveChangeHistory() { } + public string AzureSubscriptionId { get { throw null; } set { } } + public System.DateTimeOffset? ChangedTimeUtc { get { throw null; } set { } } + public string ResourceGroupName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ResourceMoveChangeHistory System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.ResourceMoveChangeHistory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class RoutingEnrichments : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RoutingEnrichments() { } @@ -4067,6 +4729,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class TopicSpacesConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TopicSpacesConfiguration() { } + public Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings ClientAuthentication { get { throw null; } set { } } public System.Collections.Generic.IList CustomDomains { get { throw null; } } public string Hostname { get { throw null; } } public int? MaximumClientSessionsPerAuthenticationName { get { throw null; } set { } } @@ -4157,6 +4820,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class UpdateTopicSpacesConfigurationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public UpdateTopicSpacesConfigurationInfo() { } + public Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings ClientAuthentication { get { throw null; } set { } } public System.Collections.Generic.IList CustomDomains { get { throw null; } } public int? MaximumClientSessionsPerAuthenticationName { get { throw null; } set { } } public int? MaximumSessionExpiryInHours { get { throw null; } set { } } @@ -4193,6 +4857,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState left, Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class WebhookAuthenticationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebhookAuthenticationSettings(Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentity identity, System.Uri endpointUri, System.Uri azureActiveDirectoryApplicationIdOrUri, string azureActiveDirectoryTenantId) { } + public System.Uri AzureActiveDirectoryApplicationIdOrUri { get { throw null; } set { } } + public string AzureActiveDirectoryTenantId { get { throw null; } set { } } + public System.Uri EndpointBaseUri { get { throw null; } set { } } + public System.Uri EndpointUri { get { throw null; } set { } } + public Azure.ResourceManager.EventGrid.Models.CustomWebhookAuthenticationManagedIdentity Identity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookAuthenticationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookAuthenticationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class WebHookEventSubscriptionDestination : Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebHookEventSubscriptionDestination() { } @@ -4211,4 +4890,30 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class WebhookPartnerDestinationInfo : Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebhookPartnerDestinationInfo() { } + public Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication ClientAuthentication { get { throw null; } set { } } + public System.Uri EndpointBaseUri { get { throw null; } set { } } + public System.Uri EndpointUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookPartnerDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookPartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebhookUpdatePartnerDestinationInfo : Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebhookUpdatePartnerDestinationInfo() { } + public Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication ClientAuthentication { get { throw null; } set { } } + public System.Uri EndpointBaseUri { get { throw null; } set { } } + public System.Uri EndpointUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookUpdatePartnerDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EventGrid.Models.WebhookUpdatePartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_CaCertificateCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_CaCertificateCollection.cs index 6cba5b4c843a..e1f889d21cf2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_CaCertificateCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_CaCertificateCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_CaCertificateCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CaCertificatesCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/CaCertificates_CreateOrUpdate.json // this example is just showing the usage of "CaCertificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CaCertificatesCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_CaCertificatesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/CaCertificates_Get.json // this example is just showing the usage of "CaCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_CaCertificatesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_CaCertificatesListByNamespace() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_ListByNamespace.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/CaCertificates_ListByNamespace.json // this example is just showing the usage of "CaCertificates_ListByNamespace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetAll_CaCertificatesListByNamespace() [Ignore("Only validating compilation of examples")] public async Task Exists_CaCertificatesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/CaCertificates_Get.json // this example is just showing the usage of "CaCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task Exists_CaCertificatesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CaCertificatesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/CaCertificates_Get.json // this example is just showing the usage of "CaCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_CaCertificateResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_CaCertificateResource.cs index 09bc2889156e..8559685883a3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_CaCertificateResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_CaCertificateResource.cs @@ -19,7 +19,7 @@ public partial class Sample_CaCertificateResource [Ignore("Only validating compilation of examples")] public async Task Get_CaCertificatesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/CaCertificates_Get.json // this example is just showing the usage of "CaCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_CaCertificatesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_CaCertificatesDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/CaCertificates_Delete.json // this example is just showing the usage of "CaCertificates_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +77,7 @@ public async Task Delete_CaCertificatesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_CaCertificatesCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/CaCertificates_CreateOrUpdate.json // this example is just showing the usage of "CaCertificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainEventSubscriptionCollection.cs index f577b27ce504..7fd9c8010b29 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainEventSubscriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DomainEventSubscriptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DomainEventSubscriptionsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainEventSubscriptions_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainEventSubscriptions_CreateOrUpdate.json // this example is just showing the usage of "DomainEventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_DomainEventSubscriptionsCreateOrUpdate() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_DomainEventSubscriptionsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_DomainEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainEventSubscriptions_Get.json // this example is just showing the usage of "DomainEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Get_DomainEventSubscriptionsGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -102,7 +102,7 @@ public async Task Get_DomainEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_DomainEventSubscriptionsList() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainEventSubscriptions_List.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainEventSubscriptions_List.json // this example is just showing the usage of "DomainEventSubscriptions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task GetAll_DomainEventSubscriptionsList() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -138,7 +138,7 @@ public async Task GetAll_DomainEventSubscriptionsList() [Ignore("Only validating compilation of examples")] public async Task Exists_DomainEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainEventSubscriptions_Get.json // this example is just showing the usage of "DomainEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task Exists_DomainEventSubscriptionsGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -168,7 +168,7 @@ public async Task Exists_DomainEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DomainEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainEventSubscriptions_Get.json // this example is just showing the usage of "DomainEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetIfExists_DomainEventSubscriptionsGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainEventSubscriptionResource.cs index 55014d8456fc..78a939792674 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainEventSubscriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DomainEventSubscriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_DomainEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainEventSubscriptions_Get.json // this example is just showing the usage of "DomainEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_DomainEventSubscriptionsGet() // this example assumes you already have this DomainEventSubscriptionResource created on azure // for more information of creating DomainEventSubscriptionResource, please refer to the document of DomainEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string eventSubscriptionName = "examplesubscription1"; @@ -51,7 +51,7 @@ public async Task Get_DomainEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_DomainEventSubscriptionsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainEventSubscriptions_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainEventSubscriptions_Delete.json // this example is just showing the usage of "DomainEventSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Delete_DomainEventSubscriptionsDelete() // this example assumes you already have this DomainEventSubscriptionResource created on azure // for more information of creating DomainEventSubscriptionResource, please refer to the document of DomainEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string eventSubscriptionName = "examplesubscription1"; @@ -78,7 +78,7 @@ public async Task Delete_DomainEventSubscriptionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_DomainEventSubscriptionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainEventSubscriptions_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainEventSubscriptions_Update.json // this example is just showing the usage of "DomainEventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_DomainEventSubscriptionsUpdate() // this example assumes you already have this DomainEventSubscriptionResource created on azure // for more information of creating DomainEventSubscriptionResource, please refer to the document of DomainEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string eventSubscriptionName = "exampleEventSubscriptionName1"; @@ -124,7 +124,7 @@ public async Task Update_DomainEventSubscriptionsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetDeliveryAttributes_DomainEventSubscriptionsGetDeliveryAttributes() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainEventSubscriptions_GetDeliveryAttributes.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainEventSubscriptions_GetDeliveryAttributes.json // this example is just showing the usage of "DomainEventSubscriptions_GetDeliveryAttributes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task GetDeliveryAttributes_DomainEventSubscriptionsGetDeliveryAttri // this example assumes you already have this DomainEventSubscriptionResource created on azure // for more information of creating DomainEventSubscriptionResource, please refer to the document of DomainEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string eventSubscriptionName = "examplesubscription1"; @@ -154,7 +154,7 @@ public async Task GetDeliveryAttributes_DomainEventSubscriptionsGetDeliveryAttri [Ignore("Only validating compilation of examples")] public async Task GetFullUri_DomainEventSubscriptionsGetFullUrl() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainEventSubscriptions_GetFullUrl.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainEventSubscriptions_GetFullUrl.json // this example is just showing the usage of "DomainEventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task GetFullUri_DomainEventSubscriptionsGetFullUrl() // this example assumes you already have this DomainEventSubscriptionResource created on azure // for more information of creating DomainEventSubscriptionResource, please refer to the document of DomainEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string eventSubscriptionName = "examplesubscription1"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainNetworkSecurityPerimeterConfigurationCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainNetworkSecurityPerimeterConfigurationCollection.cs new file mode 100644 index 000000000000..58c0e9f5e73c --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainNetworkSecurityPerimeterConfigurationCollection.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.EventGrid.Samples +{ + public partial class Sample_DomainNetworkSecurityPerimeterConfigurationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_NetworkSecurityPerimeterConfigurationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this EventGridDomainResource created on azure + // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + EventGridDomainResource eventGridDomain = client.GetEventGridDomainResource(eventGridDomainResourceId); + + // get the collection of this DomainNetworkSecurityPerimeterConfigurationResource + DomainNetworkSecurityPerimeterConfigurationCollection collection = eventGridDomain.GetDomainNetworkSecurityPerimeterConfigurations(); + + // invoke the operation + string perimeterGuid = "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter"; + string associationName = "someAssociation"; + DomainNetworkSecurityPerimeterConfigurationResource result = await collection.GetAsync(perimeterGuid, associationName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_NetworkSecurityPerimeterConfigurationsList() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_List.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this EventGridDomainResource created on azure + // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + EventGridDomainResource eventGridDomain = client.GetEventGridDomainResource(eventGridDomainResourceId); + + // get the collection of this DomainNetworkSecurityPerimeterConfigurationResource + DomainNetworkSecurityPerimeterConfigurationCollection collection = eventGridDomain.GetDomainNetworkSecurityPerimeterConfigurations(); + + // invoke the operation and iterate over the result + await foreach (NetworkSecurityPerimeterConfigurationData item in collection.GetAllAsync()) + { + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {item.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_NetworkSecurityPerimeterConfigurationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this EventGridDomainResource created on azure + // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + EventGridDomainResource eventGridDomain = client.GetEventGridDomainResource(eventGridDomainResourceId); + + // get the collection of this DomainNetworkSecurityPerimeterConfigurationResource + DomainNetworkSecurityPerimeterConfigurationCollection collection = eventGridDomain.GetDomainNetworkSecurityPerimeterConfigurations(); + + // invoke the operation + string perimeterGuid = "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter"; + string associationName = "someAssociation"; + bool result = await collection.ExistsAsync(perimeterGuid, associationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_NetworkSecurityPerimeterConfigurationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this EventGridDomainResource created on azure + // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + EventGridDomainResource eventGridDomain = client.GetEventGridDomainResource(eventGridDomainResourceId); + + // get the collection of this DomainNetworkSecurityPerimeterConfigurationResource + DomainNetworkSecurityPerimeterConfigurationCollection collection = eventGridDomain.GetDomainNetworkSecurityPerimeterConfigurations(); + + // invoke the operation + string perimeterGuid = "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter"; + string associationName = "someAssociation"; + NullableResponse response = await collection.GetIfExistsAsync(perimeterGuid, associationName); + DomainNetworkSecurityPerimeterConfigurationResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainNetworkSecurityPerimeterConfigurationResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainNetworkSecurityPerimeterConfigurationResource.cs new file mode 100644 index 000000000000..2f09b92cf551 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainNetworkSecurityPerimeterConfigurationResource.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.EventGrid.Samples +{ + public partial class Sample_DomainNetworkSecurityPerimeterConfigurationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_NetworkSecurityPerimeterConfigurationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DomainNetworkSecurityPerimeterConfigurationResource created on azure + // for more information of creating DomainNetworkSecurityPerimeterConfigurationResource, please refer to the document of DomainNetworkSecurityPerimeterConfigurationResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + string perimeterGuid = "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter"; + string associationName = "someAssociation"; + ResourceIdentifier domainNetworkSecurityPerimeterConfigurationResourceId = DomainNetworkSecurityPerimeterConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName, perimeterGuid, associationName); + DomainNetworkSecurityPerimeterConfigurationResource domainNetworkSecurityPerimeterConfiguration = client.GetDomainNetworkSecurityPerimeterConfigurationResource(domainNetworkSecurityPerimeterConfigurationResourceId); + + // invoke the operation + DomainNetworkSecurityPerimeterConfigurationResource result = await domainNetworkSecurityPerimeterConfiguration.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Reconcile_NetworkSecurityPerimeterConfigurationsReconcile() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_Reconcile.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Reconcile" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DomainNetworkSecurityPerimeterConfigurationResource created on azure + // for more information of creating DomainNetworkSecurityPerimeterConfigurationResource, please refer to the document of DomainNetworkSecurityPerimeterConfigurationResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + string perimeterGuid = "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter"; + string associationName = "someAssociation"; + ResourceIdentifier domainNetworkSecurityPerimeterConfigurationResourceId = DomainNetworkSecurityPerimeterConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName, perimeterGuid, associationName); + DomainNetworkSecurityPerimeterConfigurationResource domainNetworkSecurityPerimeterConfiguration = client.GetDomainNetworkSecurityPerimeterConfigurationResource(domainNetworkSecurityPerimeterConfigurationResourceId); + + // invoke the operation + ArmOperation lro = await domainNetworkSecurityPerimeterConfiguration.ReconcileAsync(WaitUntil.Completed); + DomainNetworkSecurityPerimeterConfigurationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicCollection.cs index b12abcf66e41..8593a479a52f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_DomainTopicCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DomainTopicsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopics_CreateOrUpdate.json // this example is just showing the usage of "DomainTopics_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task CreateOrUpdate_DomainTopicsCreateOrUpdate() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -54,7 +54,7 @@ public async Task CreateOrUpdate_DomainTopicsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_DomainTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopics_Get.json // this example is just showing the usage of "DomainTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,7 +64,7 @@ public async Task Get_DomainTopicsGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain2"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -88,7 +88,7 @@ public async Task Get_DomainTopicsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_DomainTopicsListByDomain() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_ListByDomain.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopics_ListByDomain.json // this example is just showing the usage of "DomainTopics_ListByDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task GetAll_DomainTopicsListByDomain() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain2"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -124,7 +124,7 @@ public async Task GetAll_DomainTopicsListByDomain() [Ignore("Only validating compilation of examples")] public async Task Exists_DomainTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopics_Get.json // this example is just showing the usage of "DomainTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task Exists_DomainTopicsGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain2"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -154,7 +154,7 @@ public async Task Exists_DomainTopicsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DomainTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopics_Get.json // this example is just showing the usage of "DomainTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task GetIfExists_DomainTopicsGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain2"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicEventSubscriptionCollection.cs index 8ad27ff30045..a23a25211f16 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicEventSubscriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DomainTopicEventSubscriptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DomainTopicEventSubscriptionsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopicEventSubscriptions_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopicEventSubscriptions_CreateOrUpdate.json // this example is just showing the usage of "DomainTopicEventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_DomainTopicEventSubscriptionsCreateOrUpdate() // this example assumes you already have this DomainTopicResource created on azure // for more information of creating DomainTopicResource, please refer to the document of DomainTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string topicName = "exampleDomainTopic1"; @@ -69,7 +69,7 @@ public async Task CreateOrUpdate_DomainTopicEventSubscriptionsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_DomainTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopicEventSubscriptions_Get.json // this example is just showing the usage of "DomainTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_DomainTopicEventSubscriptionsGet() // this example assumes you already have this DomainTopicResource created on azure // for more information of creating DomainTopicResource, please refer to the document of DomainTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string topicName = "exampleDomainTopic1"; @@ -104,7 +104,7 @@ public async Task Get_DomainTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_DomainTopicEventSubscriptionsList() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopicEventSubscriptions_List.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopicEventSubscriptions_List.json // this example is just showing the usage of "DomainTopicEventSubscriptions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task GetAll_DomainTopicEventSubscriptionsList() // this example assumes you already have this DomainTopicResource created on azure // for more information of creating DomainTopicResource, please refer to the document of DomainTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string topicName = "exampleDomainTopic1"; @@ -141,7 +141,7 @@ public async Task GetAll_DomainTopicEventSubscriptionsList() [Ignore("Only validating compilation of examples")] public async Task Exists_DomainTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopicEventSubscriptions_Get.json // this example is just showing the usage of "DomainTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task Exists_DomainTopicEventSubscriptionsGet() // this example assumes you already have this DomainTopicResource created on azure // for more information of creating DomainTopicResource, please refer to the document of DomainTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string topicName = "exampleDomainTopic1"; @@ -172,7 +172,7 @@ public async Task Exists_DomainTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DomainTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopicEventSubscriptions_Get.json // this example is just showing the usage of "DomainTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -182,7 +182,7 @@ public async Task GetIfExists_DomainTopicEventSubscriptionsGet() // this example assumes you already have this DomainTopicResource created on azure // for more information of creating DomainTopicResource, please refer to the document of DomainTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string topicName = "exampleDomainTopic1"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicEventSubscriptionResource.cs index a4ae68a9ffd6..ffcc13f26cff 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicEventSubscriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DomainTopicEventSubscriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_DomainTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopicEventSubscriptions_Get.json // this example is just showing the usage of "DomainTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_DomainTopicEventSubscriptionsGet() // this example assumes you already have this DomainTopicEventSubscriptionResource created on azure // for more information of creating DomainTopicEventSubscriptionResource, please refer to the document of DomainTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string topicName = "exampleDomainTopic1"; @@ -52,7 +52,7 @@ public async Task Get_DomainTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_DomainTopicEventSubscriptionsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopicEventSubscriptions_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopicEventSubscriptions_Delete.json // this example is just showing the usage of "DomainTopicEventSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task Delete_DomainTopicEventSubscriptionsDelete() // this example assumes you already have this DomainTopicEventSubscriptionResource created on azure // for more information of creating DomainTopicEventSubscriptionResource, please refer to the document of DomainTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string topicName = "exampleDomainTopic1"; @@ -80,7 +80,7 @@ public async Task Delete_DomainTopicEventSubscriptionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_DomainTopicEventSubscriptionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopicEventSubscriptions_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopicEventSubscriptions_Update.json // this example is just showing the usage of "DomainTopicEventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Update_DomainTopicEventSubscriptionsUpdate() // this example assumes you already have this DomainTopicEventSubscriptionResource created on azure // for more information of creating DomainTopicEventSubscriptionResource, please refer to the document of DomainTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string topicName = "exampleDomainTopic1"; @@ -125,10 +125,10 @@ public async Task Update_DomainTopicEventSubscriptionsUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetFullUri_DomainTopicEventSubscriptionsGetFullUrl() + public async Task GetDeliveryAttributes_DomainTopicEventSubscriptionsGetDeliveryAttributes() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopicEventSubscriptions_GetFullUrl.json - // this example is just showing the usage of "DomainTopicEventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopicEventSubscriptions_GetDeliveryAttributes.json + // this example is just showing the usage of "DomainTopicEventSubscriptions_GetDeliveryAttributes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -137,7 +137,7 @@ public async Task GetFullUri_DomainTopicEventSubscriptionsGetFullUrl() // this example assumes you already have this DomainTopicEventSubscriptionResource created on azure // for more information of creating DomainTopicEventSubscriptionResource, please refer to the document of DomainTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string topicName = "exampleDomainTopic1"; @@ -145,18 +145,21 @@ public async Task GetFullUri_DomainTopicEventSubscriptionsGetFullUrl() ResourceIdentifier domainTopicEventSubscriptionResourceId = DomainTopicEventSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName, topicName, eventSubscriptionName); DomainTopicEventSubscriptionResource domainTopicEventSubscription = client.GetDomainTopicEventSubscriptionResource(domainTopicEventSubscriptionResourceId); - // invoke the operation - EventSubscriptionFullUri result = await domainTopicEventSubscription.GetFullUriAsync(); + // invoke the operation and iterate over the result + await foreach (DeliveryAttributeMapping item in domainTopicEventSubscription.GetDeliveryAttributesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetDeliveryAttributes_DomainTopicEventSubscriptionsGetDeliveryAttributes() + public async Task GetFullUri_DomainTopicEventSubscriptionsGetFullUrl() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopicEventSubscriptions_GetDeliveryAttributes.json - // this example is just showing the usage of "DomainTopicEventSubscriptions_GetDeliveryAttributes" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopicEventSubscriptions_GetFullUrl.json + // this example is just showing the usage of "DomainTopicEventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -165,7 +168,7 @@ public async Task GetDeliveryAttributes_DomainTopicEventSubscriptionsGetDelivery // this example assumes you already have this DomainTopicEventSubscriptionResource created on azure // for more information of creating DomainTopicEventSubscriptionResource, please refer to the document of DomainTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampleDomain1"; string topicName = "exampleDomainTopic1"; @@ -173,13 +176,10 @@ public async Task GetDeliveryAttributes_DomainTopicEventSubscriptionsGetDelivery ResourceIdentifier domainTopicEventSubscriptionResourceId = DomainTopicEventSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName, topicName, eventSubscriptionName); DomainTopicEventSubscriptionResource domainTopicEventSubscription = client.GetDomainTopicEventSubscriptionResource(domainTopicEventSubscriptionResourceId); - // invoke the operation and iterate over the result - await foreach (DeliveryAttributeMapping item in domainTopicEventSubscription.GetDeliveryAttributesAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + EventSubscriptionFullUri result = await domainTopicEventSubscription.GetFullUriAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicResource.cs index c0ad0204fff6..47629fd28a93 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_DomainTopicResource.cs @@ -19,7 +19,7 @@ public partial class Sample_DomainTopicResource [Ignore("Only validating compilation of examples")] public async Task Get_DomainTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopics_Get.json // this example is just showing the usage of "DomainTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_DomainTopicsGet() // this example assumes you already have this DomainTopicResource created on azure // for more information of creating DomainTopicResource, please refer to the document of DomainTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain2"; string domainTopicName = "topic1"; @@ -50,7 +50,7 @@ public async Task Get_DomainTopicsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_DomainTopicsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopics_Delete.json // this example is just showing the usage of "DomainTopics_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Delete_DomainTopicsDelete() // this example assumes you already have this DomainTopicResource created on azure // for more information of creating DomainTopicResource, please refer to the document of DomainTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain1"; string domainTopicName = "exampledomaintopic1"; @@ -77,7 +77,7 @@ public async Task Delete_DomainTopicsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_DomainTopicsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopics_CreateOrUpdate.json // this example is just showing the usage of "DomainTopics_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Update_DomainTopicsCreateOrUpdate() // this example assumes you already have this DomainTopicResource created on azure // for more information of creating DomainTopicResource, please refer to the document of DomainTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain1"; string domainTopicName = "exampledomaintopic1"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainCollection.cs index d7bc2103dae3..baef70f4007c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_EventGridDomainCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DomainsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_CreateOrUpdate.json // this example is just showing the usage of "Domains_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task CreateOrUpdate_DomainsCreateOrUpdate() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -73,7 +73,7 @@ public async Task CreateOrUpdate_DomainsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_DomainsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Get.json // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_DomainsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -106,7 +106,7 @@ public async Task Get_DomainsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_DomainsListByResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_ListByResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_ListByResourceGroup.json // this example is just showing the usage of "Domains_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task GetAll_DomainsListByResourceGroup() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -141,7 +141,7 @@ public async Task GetAll_DomainsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_DomainsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Get.json // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task Exists_DomainsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -170,7 +170,7 @@ public async Task Exists_DomainsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DomainsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Get.json // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +180,7 @@ public async Task GetIfExists_DomainsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateEndpointConnectionCollection.cs index 797ce5b16135..61c45e2a9901 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateEndpointConnectionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridDomainPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PrivateEndpointConnectionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Update.json // this example is just showing the usage of "PrivateEndpointConnections_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionsUpdate() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionsUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,7 +74,7 @@ public async Task Get_PrivateEndpointConnectionsGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -98,7 +98,7 @@ public async Task Get_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateEndpointConnectionsListByResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_ListByResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_ListByResource.json // this example is just showing the usage of "PrivateEndpointConnections_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +108,7 @@ public async Task GetAll_PrivateEndpointConnectionsListByResource() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -134,7 +134,7 @@ public async Task GetAll_PrivateEndpointConnectionsListByResource() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Exists_PrivateEndpointConnectionsGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -164,7 +164,7 @@ public async Task Exists_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_PrivateEndpointConnectionsGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateEndpointConnectionResource.cs index 1f8064d6cc22..7623b6e6a78c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateEndpointConnectionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridDomainPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_PrivateEndpointConnectionsGet() // this example assumes you already have this EventGridDomainPrivateEndpointConnectionResource created on azure // for more information of creating EventGridDomainPrivateEndpointConnectionResource, please refer to the document of EventGridDomainPrivateEndpointConnectionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateEndpointConnectionName = "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B"; @@ -51,7 +51,7 @@ public async Task Get_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PrivateEndpointConnectionsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Delete.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Delete_PrivateEndpointConnectionsDelete() // this example assumes you already have this EventGridDomainPrivateEndpointConnectionResource created on azure // for more information of creating EventGridDomainPrivateEndpointConnectionResource, please refer to the document of EventGridDomainPrivateEndpointConnectionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateEndpointConnectionName = "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B"; @@ -78,7 +78,7 @@ public async Task Delete_PrivateEndpointConnectionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PrivateEndpointConnectionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Update.json // this example is just showing the usage of "PrivateEndpointConnections_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_PrivateEndpointConnectionsUpdate() // this example assumes you already have this EventGridDomainPrivateEndpointConnectionResource created on azure // for more information of creating EventGridDomainPrivateEndpointConnectionResource, please refer to the document of EventGridDomainPrivateEndpointConnectionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateEndpointConnectionName = "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateLinkResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateLinkResource.cs index 7a1ca99089ce..e6da0ddf35a3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateLinkResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_EventGridDomainPrivateLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_PrivateLinkResourcesGet() // this example assumes you already have this EventGridDomainPrivateLinkResource created on azure // for more information of creating EventGridDomainPrivateLinkResource, please refer to the document of EventGridDomainPrivateLinkResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateLinkResourceName = "topic"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateLinkResourceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateLinkResourceCollection.cs index 04917f2a66a2..1dac0d3698fa 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateLinkResourceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainPrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_EventGridDomainPrivateLinkResourceCollection [Ignore("Only validating compilation of examples")] public async Task Get_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_PrivateLinkResourcesGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -53,7 +53,7 @@ public async Task Get_PrivateLinkResourcesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateLinkResourcesListByResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_ListByResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_ListByResource.json // this example is just showing the usage of "PrivateLinkResources_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task GetAll_PrivateLinkResourcesListByResource() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -89,7 +89,7 @@ public async Task GetAll_PrivateLinkResourcesListByResource() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Exists_PrivateLinkResourcesGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -119,7 +119,7 @@ public async Task Exists_PrivateLinkResourcesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_PrivateLinkResourcesGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainResource.cs index 1dfb8f1ac8bd..6175329554a4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridDomainResource.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridDomainResource [Ignore("Only validating compilation of examples")] public async Task Get_DomainsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Get.json // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_DomainsGet() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain2"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -50,7 +50,7 @@ public async Task Get_DomainsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_DomainsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Delete.json // this example is just showing the usage of "Domains_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Delete_DomainsDelete() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -76,7 +76,7 @@ public async Task Delete_DomainsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_DomainsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Update.json // this example is just showing the usage of "Domains_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_DomainsUpdate() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain1"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -120,7 +120,7 @@ public async Task Update_DomainsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetSharedAccessKeys_DomainsListSharedAccessKeys() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_ListSharedAccessKeys.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_ListSharedAccessKeys.json // this example is just showing the usage of "Domains_ListSharedAccessKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task GetSharedAccessKeys_DomainsListSharedAccessKeys() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain2"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); @@ -146,7 +146,7 @@ public async Task GetSharedAccessKeys_DomainsListSharedAccessKeys() [Ignore("Only validating compilation of examples")] public async Task RegenerateKey_DomainsRegenerateKey() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_RegenerateKey.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_RegenerateKey.json // this example is just showing the usage of "Domains_RegenerateKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -156,7 +156,7 @@ public async Task RegenerateKey_DomainsRegenerateKey() // this example assumes you already have this EventGridDomainResource created on azure // for more information of creating EventGridDomainResource, please refer to the document of EventGridDomainResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "exampledomain2"; ResourceIdentifier eventGridDomainResourceId = EventGridDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientCollection.cs index d5dceb59af07..e6ec2f1d0418 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridNamespaceClientCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ClientsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_CreateOrUpdate.json // this example is just showing the usage of "Clients_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -75,7 +75,7 @@ public async Task CreateOrUpdate_ClientsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_ClientsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_Get.json // this example is just showing the usage of "Clients_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Get_ClientsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ClientsListByNamespace() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_ListByNamespace.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_ListByNamespace.json // this example is just showing the usage of "Clients_ListByNamespace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task GetAll_ClientsListByNamespace() [Ignore("Only validating compilation of examples")] public async Task Exists_ClientsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_Get.json // this example is just showing the usage of "Clients_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task Exists_ClientsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ClientsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_Get.json // this example is just showing the usage of "Clients_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientGroupCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientGroupCollection.cs index b4b728ba9a25..51e8106974a5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientGroupCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientGroupCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_EventGridNamespaceClientGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ClientGroupsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ClientGroups_CreateOrUpdate.json // this example is just showing the usage of "ClientGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_ClientGroupsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_ClientGroupsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ClientGroups_Get.json // this example is just showing the usage of "ClientGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ClientGroupsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ClientGroupsListByNamespace() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_ListByNamespace.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ClientGroups_ListByNamespace.json // this example is just showing the usage of "ClientGroups_ListByNamespace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetAll_ClientGroupsListByNamespace() [Ignore("Only validating compilation of examples")] public async Task Exists_ClientGroupsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ClientGroups_Get.json // this example is just showing the usage of "ClientGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task Exists_ClientGroupsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ClientGroupsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ClientGroups_Get.json // this example is just showing the usage of "ClientGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientGroupResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientGroupResource.cs index d7ea3f9aa615..ed633e773695 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientGroupResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientGroupResource.cs @@ -19,7 +19,7 @@ public partial class Sample_EventGridNamespaceClientGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_ClientGroupsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ClientGroups_Get.json // this example is just showing the usage of "ClientGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_ClientGroupsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ClientGroupsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ClientGroups_Delete.json // this example is just showing the usage of "ClientGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +77,7 @@ public async Task Delete_ClientGroupsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ClientGroupsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ClientGroups_CreateOrUpdate.json // this example is just showing the usage of "ClientGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientResource.cs index 6f0a145887c3..85f8ce4224be 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceClientResource.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridNamespaceClientResource [Ignore("Only validating compilation of examples")] public async Task Get_ClientsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_Get.json // this example is just showing the usage of "Clients_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_ClientsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ClientsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_Delete.json // this example is just showing the usage of "Clients_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_ClientsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ClientsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_CreateOrUpdate.json // this example is just showing the usage of "Clients_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceCollection.cs index 07d3d9fe485a..7e8844b8c60a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_EventGridNamespaceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NamespacesCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_CreateOrUpdate.json // this example is just showing the usage of "Namespaces_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_NamespacesCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_NamespacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_Get.json // this example is just showing the usage of "Namespaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Get_NamespacesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NamespacesListByResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_ListByResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_ListByResourceGroup.json // this example is just showing the usage of "Namespaces_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -136,7 +136,7 @@ public async Task GetAll_NamespacesListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_NamespacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_Get.json // this example is just showing the usage of "Namespaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task Exists_NamespacesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NamespacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_Get.json // this example is just showing the usage of "Namespaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespacePermissionBindingCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespacePermissionBindingCollection.cs index 24d529f53062..519ad9a92678 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespacePermissionBindingCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespacePermissionBindingCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridNamespacePermissionBindingCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PermissionBindingsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PermissionBindings_CreateOrUpdate.json // this example is just showing the usage of "PermissionBindings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_PermissionBindingsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PermissionBindingsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PermissionBindings_Get.json // this example is just showing the usage of "PermissionBindings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_PermissionBindingsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PermissionBindingsListByNamespace() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_ListByNamespace.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PermissionBindings_ListByNamespace.json // this example is just showing the usage of "PermissionBindings_ListByNamespace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task GetAll_PermissionBindingsListByNamespace() [Ignore("Only validating compilation of examples")] public async Task Exists_PermissionBindingsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PermissionBindings_Get.json // this example is just showing the usage of "PermissionBindings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Exists_PermissionBindingsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PermissionBindingsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PermissionBindings_Get.json // this example is just showing the usage of "PermissionBindings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespacePermissionBindingResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespacePermissionBindingResource.cs index adc2136e33b9..2f765a6ca07b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespacePermissionBindingResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespacePermissionBindingResource.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridNamespacePermissionBindingResource [Ignore("Only validating compilation of examples")] public async Task Get_PermissionBindingsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PermissionBindings_Get.json // this example is just showing the usage of "PermissionBindings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_PermissionBindingsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PermissionBindingsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PermissionBindings_Delete.json // this example is just showing the usage of "PermissionBindings_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_PermissionBindingsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PermissionBindingsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PermissionBindings_CreateOrUpdate.json // this example is just showing the usage of "PermissionBindings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceResource.cs index bd181ee02c5a..88dedac2ecfb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridNamespaceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridNamespaceResource [Ignore("Only validating compilation of examples")] public async Task Get_NamespacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_Get.json // this example is just showing the usage of "Namespaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_NamespacesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NamespacesDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_Delete.json // this example is just showing the usage of "Namespaces_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_NamespacesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NamespacesUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_Update.json // this example is just showing the usage of "Namespaces_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_NamespacesUpdate() [Ignore("Only validating compilation of examples")] public async Task GetSharedAccessKeys_NamespacesListSharedAccessKeys() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_ListSharedAccessKeys.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_ListSharedAccessKeys.json // this example is just showing the usage of "Namespaces_ListSharedAccessKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task GetSharedAccessKeys_NamespacesListSharedAccessKeys() [Ignore("Only validating compilation of examples")] public async Task RegenerateKey_NamespacesRegenerateKey() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_RegenerateKey.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_RegenerateKey.json // this example is just showing the usage of "Namespaces_RegenerateKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task RegenerateKey_NamespacesRegenerateKey() [Ignore("Only validating compilation of examples")] public async Task ValidateCustomDomainOwnership_NamespacesValidateCustomDomainOwnership() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_ValidateCustomDomainOwnership.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_ValidateCustomDomainOwnership.json // this example is just showing the usage of "Namespaces_ValidateCustomDomainOwnership" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs index 20eec7a8ddb9..d8f094101734 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridPartnerNamespacePrivateEndpointConnectionCo [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PrivateEndpointConnectionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Update.json // this example is just showing the usage of "PrivateEndpointConnections_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionsUpdate() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionsUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,7 +74,7 @@ public async Task Get_PrivateEndpointConnectionsGet() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -98,7 +98,7 @@ public async Task Get_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateEndpointConnectionsListByResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_ListByResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_ListByResource.json // this example is just showing the usage of "PrivateEndpointConnections_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +108,7 @@ public async Task GetAll_PrivateEndpointConnectionsListByResource() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -134,7 +134,7 @@ public async Task GetAll_PrivateEndpointConnectionsListByResource() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Exists_PrivateEndpointConnectionsGet() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -164,7 +164,7 @@ public async Task Exists_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_PrivateEndpointConnectionsGet() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridPartnerNamespacePrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridPartnerNamespacePrivateEndpointConnectionResource.cs index 84bb1386e97b..77bcca9c781e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridPartnerNamespacePrivateEndpointConnectionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridPartnerNamespacePrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridPartnerNamespacePrivateEndpointConnectionRe [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_PrivateEndpointConnectionsGet() // this example assumes you already have this EventGridPartnerNamespacePrivateEndpointConnectionResource created on azure // for more information of creating EventGridPartnerNamespacePrivateEndpointConnectionResource, please refer to the document of EventGridPartnerNamespacePrivateEndpointConnectionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateEndpointConnectionName = "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B"; @@ -51,7 +51,7 @@ public async Task Get_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PrivateEndpointConnectionsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Delete.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Delete_PrivateEndpointConnectionsDelete() // this example assumes you already have this EventGridPartnerNamespacePrivateEndpointConnectionResource created on azure // for more information of creating EventGridPartnerNamespacePrivateEndpointConnectionResource, please refer to the document of EventGridPartnerNamespacePrivateEndpointConnectionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateEndpointConnectionName = "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B"; @@ -78,7 +78,7 @@ public async Task Delete_PrivateEndpointConnectionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PrivateEndpointConnectionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Update.json // this example is just showing the usage of "PrivateEndpointConnections_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_PrivateEndpointConnectionsUpdate() // this example assumes you already have this EventGridPartnerNamespacePrivateEndpointConnectionResource created on azure // for more information of creating EventGridPartnerNamespacePrivateEndpointConnectionResource, please refer to the document of EventGridPartnerNamespacePrivateEndpointConnectionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateEndpointConnectionName = "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicCollection.cs index 5731c4ae046c..6749b74bc2a0 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicCollection.cs @@ -11,6 +11,7 @@ using Azure.Identity; using Azure.ResourceManager.EventGrid.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Resources.Models; using NUnit.Framework; namespace Azure.ResourceManager.EventGrid.Samples @@ -21,7 +22,7 @@ public partial class Sample_EventGridTopicCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TopicsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_CreateOrUpdate.json // this example is just showing the usage of "Topics_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +32,7 @@ public async Task CreateOrUpdate_TopicsCreateOrUpdate() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -69,11 +70,59 @@ public async Task CreateOrUpdate_TopicsCreateOrUpdate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_TopicsCreateOrUpdateForAzureArc() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_CreateOrUpdateForAzureArc.json + // this example is just showing the usage of "Topics_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EventGridTopicResource + EventGridTopicCollection collection = resourceGroupResource.GetEventGridTopics(); + + // invoke the operation + string topicName = "exampletopic1"; + EventGridTopicData data = new EventGridTopicData(new AzureLocation("westus2")) + { + Kind = ResourceKind.AzureArc, + ExtendedLocation = new ExtendedLocation + { + Name = "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourcegroups/examplerg/providers/Microsoft.ExtendedLocation/CustomLocations/exampleCustomLocation", + }, + InputSchema = EventGridInputSchema.CloudEventSchemaV1_0, + Tags = +{ +["tag1"] = "value1", +["tag2"] = "value2" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, topicName, data); + EventGridTopicResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EventGridTopicData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Get_TopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Get.json // this example is just showing the usage of "Topics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +132,7 @@ public async Task Get_TopicsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -106,7 +155,7 @@ public async Task Get_TopicsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TopicsListByResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_ListByResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_ListByResourceGroup.json // this example is just showing the usage of "Topics_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +165,7 @@ public async Task GetAll_TopicsListByResourceGroup() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -141,7 +190,7 @@ public async Task GetAll_TopicsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_TopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Get.json // this example is just showing the usage of "Topics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +200,7 @@ public async Task Exists_TopicsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -170,7 +219,7 @@ public async Task Exists_TopicsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Get.json // this example is just showing the usage of "Topics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +229,7 @@ public async Task GetIfExists_TopicsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateEndpointConnectionCollection.cs index d415c0e1b5ac..b26d3a053af0 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateEndpointConnectionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridTopicPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PrivateEndpointConnectionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Update.json // this example is just showing the usage of "PrivateEndpointConnections_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionsUpdate() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionsUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,7 +74,7 @@ public async Task Get_PrivateEndpointConnectionsGet() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -98,7 +98,7 @@ public async Task Get_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateEndpointConnectionsListByResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_ListByResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_ListByResource.json // this example is just showing the usage of "PrivateEndpointConnections_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +108,7 @@ public async Task GetAll_PrivateEndpointConnectionsListByResource() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -134,7 +134,7 @@ public async Task GetAll_PrivateEndpointConnectionsListByResource() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Exists_PrivateEndpointConnectionsGet() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -164,7 +164,7 @@ public async Task Exists_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_PrivateEndpointConnectionsGet() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateEndpointConnectionResource.cs index 72ee62852aa2..cfdb93b01f5b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateEndpointConnectionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridTopicPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_PrivateEndpointConnectionsGet() // this example assumes you already have this EventGridTopicPrivateEndpointConnectionResource created on azure // for more information of creating EventGridTopicPrivateEndpointConnectionResource, please refer to the document of EventGridTopicPrivateEndpointConnectionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateEndpointConnectionName = "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B"; @@ -51,7 +51,7 @@ public async Task Get_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PrivateEndpointConnectionsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Delete.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Delete_PrivateEndpointConnectionsDelete() // this example assumes you already have this EventGridTopicPrivateEndpointConnectionResource created on azure // for more information of creating EventGridTopicPrivateEndpointConnectionResource, please refer to the document of EventGridTopicPrivateEndpointConnectionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateEndpointConnectionName = "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B"; @@ -78,7 +78,7 @@ public async Task Delete_PrivateEndpointConnectionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PrivateEndpointConnectionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateEndpointConnections_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateEndpointConnections_Update.json // this example is just showing the usage of "PrivateEndpointConnections_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_PrivateEndpointConnectionsUpdate() // this example assumes you already have this EventGridTopicPrivateEndpointConnectionResource created on azure // for more information of creating EventGridTopicPrivateEndpointConnectionResource, please refer to the document of EventGridTopicPrivateEndpointConnectionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateEndpointConnectionName = "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateLinkResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateLinkResource.cs index 95471af98c51..b4a553620aba 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateLinkResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_EventGridTopicPrivateLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_PrivateLinkResourcesGet() // this example assumes you already have this EventGridTopicPrivateLinkResource created on azure // for more information of creating EventGridTopicPrivateLinkResource, please refer to the document of EventGridTopicPrivateLinkResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateLinkResourceName = "topic"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateLinkResourceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateLinkResourceCollection.cs index f02b2f8eac71..ef4b91ffc931 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateLinkResourceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicPrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_EventGridTopicPrivateLinkResourceCollection [Ignore("Only validating compilation of examples")] public async Task Get_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_PrivateLinkResourcesGet() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -53,7 +53,7 @@ public async Task Get_PrivateLinkResourcesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateLinkResourcesListByResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_ListByResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_ListByResource.json // this example is just showing the usage of "PrivateLinkResources_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task GetAll_PrivateLinkResourcesListByResource() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -89,7 +89,7 @@ public async Task GetAll_PrivateLinkResourcesListByResource() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Exists_PrivateLinkResourcesGet() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -119,7 +119,7 @@ public async Task Exists_PrivateLinkResourcesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_PrivateLinkResourcesGet() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicResource.cs index e33d533f7608..5956f15ddd70 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventGridTopicResource.cs @@ -20,7 +20,7 @@ public partial class Sample_EventGridTopicResource [Ignore("Only validating compilation of examples")] public async Task Get_TopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Get.json // this example is just showing the usage of "Topics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_TopicsGet() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampletopic2"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, topicName); @@ -50,7 +50,7 @@ public async Task Get_TopicsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TopicsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Delete.json // this example is just showing the usage of "Topics_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,9 +60,9 @@ public async Task Delete_TopicsDelete() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; - string resourceGroupName = "examplerg"; - string topicName = "exampletopic"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg1"; + string topicName = "exampletopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, topicName); EventGridTopicResource eventGridTopic = client.GetEventGridTopicResource(eventGridTopicResourceId); @@ -76,7 +76,7 @@ public async Task Delete_TopicsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TopicsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Update.json // this example is just showing the usage of "Topics_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_TopicsUpdate() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampletopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, topicName); @@ -120,7 +120,7 @@ public async Task Update_TopicsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetSharedAccessKeys_TopicsListSharedAccessKeys() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_ListSharedAccessKeys.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_ListSharedAccessKeys.json // this example is just showing the usage of "Topics_ListSharedAccessKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task GetSharedAccessKeys_TopicsListSharedAccessKeys() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampletopic2"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, topicName); @@ -146,7 +146,7 @@ public async Task GetSharedAccessKeys_TopicsListSharedAccessKeys() [Ignore("Only validating compilation of examples")] public async Task RegenerateKey_TopicsRegenerateKey() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_RegenerateKey.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_RegenerateKey.json // this example is just showing the usage of "Topics_RegenerateKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -156,7 +156,7 @@ public async Task RegenerateKey_TopicsRegenerateKey() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampletopic2"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, topicName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionCollection.cs index 0b5027be14db..71ff03ad438f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_EventSubscriptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic.json // this example is just showing the usage of "EventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopic( ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopic( [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json // this example is just showing the usage of "EventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,7 +70,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicA ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -107,7 +107,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicA [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json // this example is just showing the usage of "EventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicE ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -153,7 +153,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicE [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json // this example is just showing the usage of "EventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicH ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -199,7 +199,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicH [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicServiceBusQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json // this example is just showing the usage of "EventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -208,7 +208,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicS ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -245,7 +245,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicS [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopicDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json // this example is just showing the usage of "EventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -254,7 +254,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicS ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -291,7 +291,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicS [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json // this example is just showing the usage of "EventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -300,7 +300,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicS ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -311,6 +311,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicS { ResourceId = new ResourceIdentifier("/subscriptions/d33c5f7a-02ea-40f4-bf52-07f17e84d6a8/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg"), QueueName = "queue1", + QueueMessageTimeToLiveInSeconds = 300L, }, Filter = new EventSubscriptionFilter { @@ -338,7 +339,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicS [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json // this example is just showing the usage of "EventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -347,16 +348,16 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicW ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation string eventSubscriptionName = "examplesubscription1"; EventGridSubscriptionData data = new EventGridSubscriptionData { - Destination = new WebHookEventSubscriptionDestination + Destination = new EventHubEventSubscriptionDestination { - Endpoint = new Uri("https://azurefunctionexample.azurewebsites.net/runtime/webhooks/EventGrid?functionName=EventGridTrigger1&code=PASSWORDCODE"), + ResourceId = new ResourceIdentifier("/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1"), }, Filter = new EventSubscriptionFilter { @@ -379,7 +380,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicW [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_CreateOrUpdateForResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_CreateOrUpdateForResource.json // this example is just showing the usage of "EventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -388,7 +389,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForResource() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -420,7 +421,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForResource() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_CreateOrUpdateForResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_CreateOrUpdateForResourceGroup.json // this example is just showing the usage of "EventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -429,7 +430,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForResourceGrou ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -461,7 +462,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForResourceGrou [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForSubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_CreateOrUpdateForSubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_CreateOrUpdateForSubscription.json // this example is just showing the usage of "EventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -470,7 +471,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForSubscription ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -500,7 +501,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForSubscription [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -509,7 +510,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopic() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -527,7 +528,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopic() [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicAzureFunctionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -536,7 +537,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicAzureFunctionDestinatio ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -554,7 +555,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicAzureFunctionDestinatio [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicEventHubDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -563,7 +564,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicEventHubDestination() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -581,7 +582,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicEventHubDestination() [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicHybridConnectionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -590,7 +591,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicHybridConnectionDestina ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -608,7 +609,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicHybridConnectionDestina [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -617,7 +618,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusQueueDestinat ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -635,7 +636,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusQueueDestinat [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusTopicDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -644,7 +645,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusTopicDestinat ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -662,7 +663,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusTopicDestinat [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicStorageQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -671,7 +672,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicStorageQueueDestination ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -689,7 +690,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicStorageQueueDestination [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicWebhookDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -698,7 +699,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicWebhookDestination() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -716,7 +717,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicWebhookDestination() [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForResource.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -725,7 +726,7 @@ public async Task Get_EventSubscriptionsGetForResource() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -743,7 +744,7 @@ public async Task Get_EventSubscriptionsGetForResource() [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForResourceGroup.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -752,7 +753,7 @@ public async Task Get_EventSubscriptionsGetForResourceGroup() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -770,7 +771,7 @@ public async Task Get_EventSubscriptionsGetForResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForSubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForSubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForSubscription.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -779,7 +780,7 @@ public async Task Get_EventSubscriptionsGetForSubscription() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -797,7 +798,7 @@ public async Task Get_EventSubscriptionsGetForSubscription() [Ignore("Only validating compilation of examples")] public async Task GetAll_EventSubscriptionsListGlobalBySubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_ListGlobalBySubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_ListGlobalBySubscription.json // this example is just showing the usage of "EventSubscriptions_ListGlobalBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -806,7 +807,7 @@ public async Task GetAll_EventSubscriptionsListGlobalBySubscription() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string scope = $"/subscriptions/{subscriptionId}"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); @@ -827,7 +828,7 @@ public async Task GetAll_EventSubscriptionsListGlobalBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetAll_EventSubscriptionsListGlobalByResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_ListGlobalByResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroup.json // this example is just showing the usage of "EventSubscriptions_ListGlobalByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -836,7 +837,7 @@ public async Task GetAll_EventSubscriptionsListGlobalByResourceGroup() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string scope = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); @@ -858,7 +859,7 @@ public async Task GetAll_EventSubscriptionsListGlobalByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_EventSubscriptionsListByResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_ListByResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_ListByResource.json // this example is just showing the usage of "EventSubscriptions_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -867,7 +868,7 @@ public async Task GetAll_EventSubscriptionsListByResource() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string providerNamespace = "Microsoft.EventGrid"; string resourceTypeName = "topics"; @@ -892,7 +893,7 @@ public async Task GetAll_EventSubscriptionsListByResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_EventSubscriptionsListByDomainTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_ListByDomainTopic.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_ListByDomainTopic.json // this example is just showing the usage of "EventSubscriptions_ListByDomainTopic" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -901,7 +902,7 @@ public async Task GetAll_EventSubscriptionsListByDomainTopic() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string domainName = "domain1"; string topicName = "topic1"; @@ -925,7 +926,7 @@ public async Task GetAll_EventSubscriptionsListByDomainTopic() [Ignore("Only validating compilation of examples")] public async Task Exists_EventSubscriptionsGetForCustomTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -934,7 +935,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopic() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -948,7 +949,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopic() [Ignore("Only validating compilation of examples")] public async Task Exists_EventSubscriptionsGetForCustomTopicAzureFunctionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -957,7 +958,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicAzureFunctionDestina ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -971,7 +972,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicAzureFunctionDestina [Ignore("Only validating compilation of examples")] public async Task Exists_EventSubscriptionsGetForCustomTopicEventHubDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -980,7 +981,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicEventHubDestination( ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -994,7 +995,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicEventHubDestination( [Ignore("Only validating compilation of examples")] public async Task Exists_EventSubscriptionsGetForCustomTopicHybridConnectionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1003,7 +1004,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicHybridConnectionDest ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1017,7 +1018,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicHybridConnectionDest [Ignore("Only validating compilation of examples")] public async Task Exists_EventSubscriptionsGetForCustomTopicServiceBusQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1026,7 +1027,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicServiceBusQueueDesti ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1040,7 +1041,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicServiceBusQueueDesti [Ignore("Only validating compilation of examples")] public async Task Exists_EventSubscriptionsGetForCustomTopicServiceBusTopicDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1049,7 +1050,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicServiceBusTopicDesti ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1063,7 +1064,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicServiceBusTopicDesti [Ignore("Only validating compilation of examples")] public async Task Exists_EventSubscriptionsGetForCustomTopicStorageQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1072,7 +1073,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicStorageQueueDestinat ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1086,7 +1087,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicStorageQueueDestinat [Ignore("Only validating compilation of examples")] public async Task Exists_EventSubscriptionsGetForCustomTopicWebhookDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1095,7 +1096,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicWebhookDestination() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1109,7 +1110,7 @@ public async Task Exists_EventSubscriptionsGetForCustomTopicWebhookDestination() [Ignore("Only validating compilation of examples")] public async Task Exists_EventSubscriptionsGetForResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForResource.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1118,7 +1119,7 @@ public async Task Exists_EventSubscriptionsGetForResource() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1132,7 +1133,7 @@ public async Task Exists_EventSubscriptionsGetForResource() [Ignore("Only validating compilation of examples")] public async Task Exists_EventSubscriptionsGetForResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForResourceGroup.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1141,7 +1142,7 @@ public async Task Exists_EventSubscriptionsGetForResourceGroup() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1155,7 +1156,7 @@ public async Task Exists_EventSubscriptionsGetForResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_EventSubscriptionsGetForSubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForSubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForSubscription.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1164,7 +1165,7 @@ public async Task Exists_EventSubscriptionsGetForSubscription() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1178,7 +1179,7 @@ public async Task Exists_EventSubscriptionsGetForSubscription() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EventSubscriptionsGetForCustomTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1187,7 +1188,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopic() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1213,7 +1214,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopic() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EventSubscriptionsGetForCustomTopicAzureFunctionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1222,7 +1223,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicAzureFunctionDe ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1248,7 +1249,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicAzureFunctionDe [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EventSubscriptionsGetForCustomTopicEventHubDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1257,7 +1258,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicEventHubDestina ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1283,7 +1284,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicEventHubDestina [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EventSubscriptionsGetForCustomTopicHybridConnectionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1292,7 +1293,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicHybridConnectio ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1318,7 +1319,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicHybridConnectio [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EventSubscriptionsGetForCustomTopicServiceBusQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1327,7 +1328,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicServiceBusQueue ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1353,7 +1354,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicServiceBusQueue [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EventSubscriptionsGetForCustomTopicServiceBusTopicDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1362,7 +1363,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicServiceBusTopic ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1388,7 +1389,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicServiceBusTopic [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EventSubscriptionsGetForCustomTopicStorageQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1397,7 +1398,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicStorageQueueDes ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1423,7 +1424,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicStorageQueueDes [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EventSubscriptionsGetForCustomTopicWebhookDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1432,7 +1433,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicWebhookDestinat ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1458,7 +1459,7 @@ public async Task GetIfExists_EventSubscriptionsGetForCustomTopicWebhookDestinat [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EventSubscriptionsGetForResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForResource.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1467,7 +1468,7 @@ public async Task GetIfExists_EventSubscriptionsGetForResource() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1493,7 +1494,7 @@ public async Task GetIfExists_EventSubscriptionsGetForResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EventSubscriptionsGetForResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForResourceGroup.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1502,7 +1503,7 @@ public async Task GetIfExists_EventSubscriptionsGetForResourceGroup() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation @@ -1528,7 +1529,7 @@ public async Task GetIfExists_EventSubscriptionsGetForResourceGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EventSubscriptionsGetForSubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForSubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForSubscription.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1537,7 +1538,7 @@ public async Task GetIfExists_EventSubscriptionsGetForSubscription() ArmClient client = new ArmClient(cred); // get the collection of this EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; EventSubscriptionCollection collection = client.GetEventSubscriptions(new ResourceIdentifier(scope)); // invoke the operation diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionResource.cs index aec60a2054ad..dc97f2660109 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_EventSubscriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopic() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -49,7 +49,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopic() [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicAzureFunctionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicAzureFunctionDestinatio // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -78,7 +78,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicAzureFunctionDestinatio [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicEventHubDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicEventHubDestination() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -107,7 +107,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicEventHubDestination() [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicHybridConnectionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicHybridConnectionDestina // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -136,7 +136,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicHybridConnectionDestina [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,7 +146,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusQueueDestinat // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -165,7 +165,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusQueueDestinat [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusTopicDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusTopicDestinat // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -194,7 +194,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicServiceBusTopicDestinat [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicStorageQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -204,7 +204,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicStorageQueueDestination // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -223,7 +223,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicStorageQueueDestination [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForCustomTopicWebhookDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicWebhookDestination() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -252,7 +252,7 @@ public async Task Get_EventSubscriptionsGetForCustomTopicWebhookDestination() [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForResource.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -262,7 +262,7 @@ public async Task Get_EventSubscriptionsGetForResource() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -281,7 +281,7 @@ public async Task Get_EventSubscriptionsGetForResource() [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForResourceGroup.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -291,7 +291,7 @@ public async Task Get_EventSubscriptionsGetForResourceGroup() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; string eventSubscriptionName = "examplesubscription2"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -310,7 +310,7 @@ public async Task Get_EventSubscriptionsGetForResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Get_EventSubscriptionsGetForSubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetForSubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetForSubscription.json // this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -320,7 +320,7 @@ public async Task Get_EventSubscriptionsGetForSubscription() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string eventSubscriptionName = "examplesubscription3"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -339,7 +339,7 @@ public async Task Get_EventSubscriptionsGetForSubscription() [Ignore("Only validating compilation of examples")] public async Task Delete_EventSubscriptionsDeleteForCustomTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_DeleteForCustomTopic.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_DeleteForCustomTopic.json // this example is just showing the usage of "EventSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -349,7 +349,7 @@ public async Task Delete_EventSubscriptionsDeleteForCustomTopic() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -364,7 +364,7 @@ public async Task Delete_EventSubscriptionsDeleteForCustomTopic() [Ignore("Only validating compilation of examples")] public async Task Delete_EventSubscriptionsDeleteForResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_DeleteForResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_DeleteForResource.json // this example is just showing the usage of "EventSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -374,7 +374,7 @@ public async Task Delete_EventSubscriptionsDeleteForResource() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; string eventSubscriptionName = "examplesubscription10"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -389,7 +389,7 @@ public async Task Delete_EventSubscriptionsDeleteForResource() [Ignore("Only validating compilation of examples")] public async Task Delete_EventSubscriptionsDeleteForResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_DeleteForResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_DeleteForResourceGroup.json // this example is just showing the usage of "EventSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -399,7 +399,7 @@ public async Task Delete_EventSubscriptionsDeleteForResourceGroup() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; string eventSubscriptionName = "examplesubscription2"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -414,7 +414,7 @@ public async Task Delete_EventSubscriptionsDeleteForResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_EventSubscriptionsDeleteForSubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_DeleteForSubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_DeleteForSubscription.json // this example is just showing the usage of "EventSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -424,7 +424,7 @@ public async Task Delete_EventSubscriptionsDeleteForSubscription() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string eventSubscriptionName = "examplesubscription3"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -439,7 +439,7 @@ public async Task Delete_EventSubscriptionsDeleteForSubscription() [Ignore("Only validating compilation of examples")] public async Task Update_EventSubscriptionsUpdateForCustomTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_UpdateForCustomTopic.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_UpdateForCustomTopic.json // this example is just showing the usage of "EventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -449,7 +449,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopic() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -483,7 +483,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopic() [Ignore("Only validating compilation of examples")] public async Task Update_EventSubscriptionsUpdateForCustomTopicAzureFunctionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json // this example is just showing the usage of "EventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -493,7 +493,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicAzureFunctionDest // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -531,7 +531,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicAzureFunctionDest [Ignore("Only validating compilation of examples")] public async Task Update_EventSubscriptionsUpdateForCustomTopicEventHubDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json // this example is just showing the usage of "EventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -541,7 +541,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicEventHubDestinati // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -575,7 +575,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicEventHubDestinati [Ignore("Only validating compilation of examples")] public async Task Update_EventSubscriptionsUpdateForCustomTopicHybridConnectionDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json // this example is just showing the usage of "EventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -585,7 +585,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicHybridConnectionD // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -619,7 +619,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicHybridConnectionD [Ignore("Only validating compilation of examples")] public async Task Update_EventSubscriptionsUpdateForCustomTopicServiceBusQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json // this example is just showing the usage of "EventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -629,7 +629,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicServiceBusQueueDe // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -667,7 +667,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicServiceBusQueueDe [Ignore("Only validating compilation of examples")] public async Task Update_EventSubscriptionsUpdateForCustomTopicServiceBusTopicDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json // this example is just showing the usage of "EventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -677,7 +677,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicServiceBusTopicDe // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -711,7 +711,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicServiceBusTopicDe [Ignore("Only validating compilation of examples")] public async Task Update_EventSubscriptionsUpdateForCustomTopicStorageQueueDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json // this example is just showing the usage of "EventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -721,7 +721,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicStorageQueueDesti // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -761,7 +761,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicStorageQueueDesti [Ignore("Only validating compilation of examples")] public async Task Update_EventSubscriptionsUpdateForCustomTopicWebhookDestination() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json // this example is just showing the usage of "EventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -771,7 +771,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicWebhookDestinatio // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -805,7 +805,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicWebhookDestinatio [Ignore("Only validating compilation of examples")] public async Task Update_EventSubscriptionsUpdateForResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_UpdateForResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_UpdateForResource.json // this example is just showing the usage of "EventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -815,7 +815,7 @@ public async Task Update_EventSubscriptionsUpdateForResource() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -849,7 +849,7 @@ public async Task Update_EventSubscriptionsUpdateForResource() [Ignore("Only validating compilation of examples")] public async Task Update_EventSubscriptionsUpdateForResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_UpdateForResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_UpdateForResourceGroup.json // this example is just showing the usage of "EventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -859,7 +859,7 @@ public async Task Update_EventSubscriptionsUpdateForResourceGroup() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; string eventSubscriptionName = "examplesubscription2"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -893,7 +893,7 @@ public async Task Update_EventSubscriptionsUpdateForResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Update_EventSubscriptionsUpdateForSubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_UpdateForSubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_UpdateForSubscription.json // this example is just showing the usage of "EventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -903,7 +903,7 @@ public async Task Update_EventSubscriptionsUpdateForSubscription() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string eventSubscriptionName = "examplesubscription3"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -935,10 +935,10 @@ public async Task Update_EventSubscriptionsUpdateForSubscription() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetFullUri_EventSubscriptionsGetFullUrlForCustomTopic() + public async Task GetDeliveryAttributes_EventSubscriptionsGetDeliveryAttributes() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetFullUrlForCustomTopic.json - // this example is just showing the usage of "EventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetDeliveryAttributes.json + // this example is just showing the usage of "EventSubscriptions_GetDeliveryAttributes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -947,22 +947,25 @@ public async Task GetFullUri_EventSubscriptionsGetFullUrlForCustomTopic() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); - // invoke the operation - EventSubscriptionFullUri result = await eventSubscription.GetFullUriAsync(); + // invoke the operation and iterate over the result + await foreach (DeliveryAttributeMapping item in eventSubscription.GetDeliveryAttributesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetFullUri_EventSubscriptionsGetFullUrlForResource() + public async Task GetFullUri_EventSubscriptionsGetFullUrlForCustomTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetFullUrlForResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetFullUrlForCustomTopic.json // this example is just showing the usage of "EventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -972,7 +975,7 @@ public async Task GetFullUri_EventSubscriptionsGetFullUrlForResource() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -985,9 +988,9 @@ public async Task GetFullUri_EventSubscriptionsGetFullUrlForResource() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetFullUri_EventSubscriptionsGetFullUrlForResourceGroup() + public async Task GetFullUri_EventSubscriptionsGetFullUrlForResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetFullUrlForResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetFullUrlForResource.json // this example is just showing the usage of "EventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -997,8 +1000,8 @@ public async Task GetFullUri_EventSubscriptionsGetFullUrlForResourceGroup() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"; - string eventSubscriptionName = "examplesubscription2"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; + string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -1010,9 +1013,9 @@ public async Task GetFullUri_EventSubscriptionsGetFullUrlForResourceGroup() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetFullUri_EventSubscriptionsGetFullUrlForSubscription() + public async Task GetFullUri_EventSubscriptionsGetFullUrlForResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetFullUrlForSubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetFullUrlForResourceGroup.json // this example is just showing the usage of "EventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1022,8 +1025,8 @@ public async Task GetFullUri_EventSubscriptionsGetFullUrlForSubscription() // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; - string eventSubscriptionName = "examplesubscription3"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; + string eventSubscriptionName = "examplesubscription2"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); @@ -1035,10 +1038,10 @@ public async Task GetFullUri_EventSubscriptionsGetFullUrlForSubscription() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetDeliveryAttributes_EventSubscriptionsGetDeliveryAttributes() + public async Task GetFullUri_EventSubscriptionsGetFullUrlForSubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/EventSubscriptions_GetDeliveryAttributes.json - // this example is just showing the usage of "EventSubscriptions_GetDeliveryAttributes" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/EventSubscriptions_GetFullUrlForSubscription.json + // this example is just showing the usage of "EventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -1047,18 +1050,15 @@ public async Task GetDeliveryAttributes_EventSubscriptionsGetDeliveryAttributes( // this example assumes you already have this EventSubscriptionResource created on azure // for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource - string scope = "aaaaaaaaaaaaaaaaaaaaaaaaa"; - string eventSubscriptionName = "aaaaaaaaaaaaaaaaaa"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string eventSubscriptionName = "examplesubscription3"; ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName); EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId); - // invoke the operation and iterate over the result - await foreach (DeliveryAttributeMapping item in eventSubscription.GetDeliveryAttributesAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + EventSubscriptionFullUri result = await eventSubscription.GetFullUriAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_ExtensionTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_ExtensionTopicResource.cs index 130ad9fea961..0a598512817b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_ExtensionTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_ExtensionTopicResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ExtensionTopicResource [Ignore("Only validating compilation of examples")] public async Task Get_ExtensionTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ExtensionTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ExtensionTopics_Get.json // this example is just showing the usage of "ExtensionTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_ExtensionTopicsGet() // this example assumes you already have this ExtensionTopicResource created on azure // for more information of creating ExtensionTopicResource, please refer to the document of ExtensionTopicResource - string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default"; + string scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default"; ResourceIdentifier extensionTopicResourceId = ExtensionTopicResource.CreateResourceIdentifier(scope); ExtensionTopicResource extensionTopic = client.GetExtensionTopicResource(extensionTopicResourceId); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicCollection.cs index a52adc3aa7aa..d1febc21c284 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NamespaceTopicCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NamespaceTopicsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopics_CreateOrUpdate.json // this example is just showing the usage of "NamespaceTopics_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_NamespaceTopicsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_NamespaceTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopics_Get.json // this example is just showing the usage of "NamespaceTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_NamespaceTopicsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NamespaceTopicsListByNamespace() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_ListByNamespace.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopics_ListByNamespace.json // this example is just showing the usage of "NamespaceTopics_ListByNamespace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task GetAll_NamespaceTopicsListByNamespace() [Ignore("Only validating compilation of examples")] public async Task Exists_NamespaceTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopics_Get.json // this example is just showing the usage of "NamespaceTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Exists_NamespaceTopicsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NamespaceTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopics_Get.json // this example is just showing the usage of "NamespaceTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicEventSubscriptionCollection.cs index c2e82603293f..26e71d2823ad 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicEventSubscriptionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NamespaceTopicEventSubscriptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NamespaceTopicEventSubscriptionsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopicEventSubscriptions_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopicEventSubscriptions_CreateOrUpdate.json // this example is just showing the usage of "NamespaceTopicEventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -71,7 +71,7 @@ public async Task CreateOrUpdate_NamespaceTopicEventSubscriptionsCreateOrUpdate( [Ignore("Only validating compilation of examples")] public async Task Get_NamespaceTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopicEventSubscriptions_Get.json // this example is just showing the usage of "NamespaceTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task Get_NamespaceTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NamespaceTopicEventSubscriptionsListByNamespaceTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json // this example is just showing the usage of "NamespaceTopicEventSubscriptions_ListByNamespaceTopic" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -143,7 +143,7 @@ public async Task GetAll_NamespaceTopicEventSubscriptionsListByNamespaceTopic() [Ignore("Only validating compilation of examples")] public async Task Exists_NamespaceTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopicEventSubscriptions_Get.json // this example is just showing the usage of "NamespaceTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task Exists_NamespaceTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NamespaceTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopicEventSubscriptions_Get.json // this example is just showing the usage of "NamespaceTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicEventSubscriptionResource.cs index ebe98fc573de..cf93959adc5a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicEventSubscriptionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NamespaceTopicEventSubscriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_NamespaceTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopicEventSubscriptions_Get.json // this example is just showing the usage of "NamespaceTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_NamespaceTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NamespaceTopicEventSubscriptionsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopicEventSubscriptions_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopicEventSubscriptions_Delete.json // this example is just showing the usage of "NamespaceTopicEventSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Delete_NamespaceTopicEventSubscriptionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NamespaceTopicEventSubscriptionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopicEventSubscriptions_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopicEventSubscriptions_Update.json // this example is just showing the usage of "NamespaceTopicEventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Update_NamespaceTopicEventSubscriptionsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetDeliveryAttributes_NamespaceTopicEventSubscriptionsGetDeliveryAttributes() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json // this example is just showing the usage of "NamespaceTopicEventSubscriptions_GetDeliveryAttributes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task GetDeliveryAttributes_NamespaceTopicEventSubscriptionsGetDeliv [Ignore("Only validating compilation of examples")] public async Task GetFullUri_NamespaceTopicEventSubscriptionsGetFullUrl() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopicEventSubscriptions_GetFullUrl.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopicEventSubscriptions_GetFullUrl.json // this example is just showing the usage of "NamespaceTopicEventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicResource.cs index d5450b696804..c3f8978e5a03 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_NamespaceTopicResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NamespaceTopicResource [Ignore("Only validating compilation of examples")] public async Task Get_NamespaceTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopics_Get.json // this example is just showing the usage of "NamespaceTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_NamespaceTopicsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NamespaceTopicsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopics_Delete.json // this example is just showing the usage of "NamespaceTopics_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_NamespaceTopicsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NamespaceTopicsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopics_Update.json // this example is just showing the usage of "NamespaceTopics_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_NamespaceTopicsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetSharedAccessKeys_NamespaceTopicsListSharedAccessKeys() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_ListSharedAccessKeys.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopics_ListSharedAccessKeys.json // this example is just showing the usage of "NamespaceTopics_ListSharedAccessKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +141,7 @@ public async Task GetSharedAccessKeys_NamespaceTopicsListSharedAccessKeys() [Ignore("Only validating compilation of examples")] public async Task RegenerateKey_NamespaceTopicsRegenerateKey() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_RegenerateKey.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NamespaceTopics_RegenerateKey.json // this example is just showing the usage of "NamespaceTopics_RegenerateKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerConfigurationResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerConfigurationResource.cs index 1be611987f5e..c12952a987a8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerConfigurationResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PartnerConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_PartnerConfigurationsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerConfigurations_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerConfigurations_Get.json // this example is just showing the usage of "PartnerConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_PartnerConfigurationsGet() // this example assumes you already have this PartnerConfigurationResource created on azure // for more information of creating PartnerConfigurationResource, please refer to the document of PartnerConfigurationResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier partnerConfigurationResourceId = PartnerConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); PartnerConfigurationResource partnerConfiguration = client.GetPartnerConfigurationResource(partnerConfigurationResourceId); @@ -49,7 +49,7 @@ public async Task Get_PartnerConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PartnerConfigurationsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerConfigurations_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerConfigurations_Delete.json // this example is just showing the usage of "PartnerConfigurations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task Delete_PartnerConfigurationsDelete() // this example assumes you already have this PartnerConfigurationResource created on azure // for more information of creating PartnerConfigurationResource, please refer to the document of PartnerConfigurationResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier partnerConfigurationResourceId = PartnerConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); PartnerConfigurationResource partnerConfiguration = client.GetPartnerConfigurationResource(partnerConfigurationResourceId); @@ -74,7 +74,7 @@ public async Task Delete_PartnerConfigurationsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PartnerConfigurationsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerConfigurations_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerConfigurations_Update.json // this example is just showing the usage of "PartnerConfigurations_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Update_PartnerConfigurationsUpdate() // this example assumes you already have this PartnerConfigurationResource created on azure // for more information of creating PartnerConfigurationResource, please refer to the document of PartnerConfigurationResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier partnerConfigurationResourceId = PartnerConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); PartnerConfigurationResource partnerConfiguration = client.GetPartnerConfigurationResource(partnerConfigurationResourceId); @@ -113,7 +113,7 @@ public async Task Update_PartnerConfigurationsUpdate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PartnerConfigurationsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerConfigurations_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerConfigurations_CreateOrUpdate.json // this example is just showing the usage of "PartnerConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task CreateOrUpdate_PartnerConfigurationsCreateOrUpdate() // this example assumes you already have this PartnerConfigurationResource created on azure // for more information of creating PartnerConfigurationResource, please refer to the document of PartnerConfigurationResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier partnerConfigurationResourceId = PartnerConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); PartnerConfigurationResource partnerConfiguration = client.GetPartnerConfigurationResource(partnerConfigurationResourceId); @@ -161,7 +161,7 @@ public async Task CreateOrUpdate_PartnerConfigurationsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task AuthorizePartner_PartnerConfigurationsAuthorizePartner() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerConfigurations_AuthorizePartner.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerConfigurations_AuthorizePartner.json // this example is just showing the usage of "PartnerConfigurations_AuthorizePartner" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task AuthorizePartner_PartnerConfigurationsAuthorizePartner() // this example assumes you already have this PartnerConfigurationResource created on azure // for more information of creating PartnerConfigurationResource, please refer to the document of PartnerConfigurationResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier partnerConfigurationResourceId = PartnerConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); PartnerConfigurationResource partnerConfiguration = client.GetPartnerConfigurationResource(partnerConfigurationResourceId); @@ -196,7 +196,7 @@ public async Task AuthorizePartner_PartnerConfigurationsAuthorizePartner() [Ignore("Only validating compilation of examples")] public async Task UnauthorizePartner_PartnerConfigurationsUnauthorizePartner() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerConfigurations_UnauthorizePartner.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerConfigurations_UnauthorizePartner.json // this example is just showing the usage of "PartnerConfigurations_UnauthorizePartner" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -206,7 +206,7 @@ public async Task UnauthorizePartner_PartnerConfigurationsUnauthorizePartner() // this example assumes you already have this PartnerConfigurationResource created on azure // for more information of creating PartnerConfigurationResource, please refer to the document of PartnerConfigurationResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier partnerConfigurationResourceId = PartnerConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); PartnerConfigurationResource partnerConfiguration = client.GetPartnerConfigurationResource(partnerConfigurationResourceId); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerDestinationCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerDestinationCollection.cs new file mode 100644 index 000000000000..e2ebc9426b09 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerDestinationCollection.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.EventGrid.Samples +{ + public partial class Sample_PartnerDestinationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PartnerDestinationsCreateOrUpdate() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerDestinations_CreateOrUpdate.json + // this example is just showing the usage of "PartnerDestinations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this PartnerDestinationResource + PartnerDestinationCollection collection = resourceGroupResource.GetPartnerDestinations(); + + // invoke the operation + string partnerDestinationName = "examplePartnerDestinationName1"; + PartnerDestinationData data = new PartnerDestinationData(new AzureLocation("westus2")) + { + PartnerRegistrationImmutableId = Guid.Parse("0bd70ee2-7d95-447e-ab1f-c4f320019404"), + EndpointServiceContext = "This is an example", + ExpirationTimeIfNotActivatedUtc = DateTimeOffset.Parse("2022-03-14T19:33:43.430Z"), + EndpointBaseUri = new Uri("https://www.example/endpoint"), + MessageForActivation = "Sample Activation message", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, partnerDestinationName, data); + PartnerDestinationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PartnerDestinationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_PartnerDestinationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerDestinations_Get.json + // this example is just showing the usage of "PartnerDestinations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this PartnerDestinationResource + PartnerDestinationCollection collection = resourceGroupResource.GetPartnerDestinations(); + + // invoke the operation + string partnerDestinationName = "examplePartnerDestinationName1"; + PartnerDestinationResource result = await collection.GetAsync(partnerDestinationName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PartnerDestinationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_PartnerDestinationsListByResourceGroup() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerDestinations_ListByResourceGroup.json + // this example is just showing the usage of "PartnerDestinations_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this PartnerDestinationResource + PartnerDestinationCollection collection = resourceGroupResource.GetPartnerDestinations(); + + // invoke the operation and iterate over the result + await foreach (PartnerDestinationResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PartnerDestinationData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_PartnerDestinationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerDestinations_Get.json + // this example is just showing the usage of "PartnerDestinations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this PartnerDestinationResource + PartnerDestinationCollection collection = resourceGroupResource.GetPartnerDestinations(); + + // invoke the operation + string partnerDestinationName = "examplePartnerDestinationName1"; + bool result = await collection.ExistsAsync(partnerDestinationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_PartnerDestinationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerDestinations_Get.json + // this example is just showing the usage of "PartnerDestinations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this PartnerDestinationResource + PartnerDestinationCollection collection = resourceGroupResource.GetPartnerDestinations(); + + // invoke the operation + string partnerDestinationName = "examplePartnerDestinationName1"; + NullableResponse response = await collection.GetIfExistsAsync(partnerDestinationName); + PartnerDestinationResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PartnerDestinationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerDestinationResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerDestinationResource.cs new file mode 100644 index 000000000000..78e1b8ef00b5 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerDestinationResource.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.EventGrid.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.EventGrid.Samples +{ + public partial class Sample_PartnerDestinationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_PartnerDestinationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerDestinations_Get.json + // this example is just showing the usage of "PartnerDestinations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PartnerDestinationResource created on azure + // for more information of creating PartnerDestinationResource, please refer to the document of PartnerDestinationResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string partnerDestinationName = "examplePartnerDestinationName1"; + ResourceIdentifier partnerDestinationResourceId = PartnerDestinationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerDestinationName); + PartnerDestinationResource partnerDestination = client.GetPartnerDestinationResource(partnerDestinationResourceId); + + // invoke the operation + PartnerDestinationResource result = await partnerDestination.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PartnerDestinationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_PartnerDestinationsDelete() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerDestinations_Delete.json + // this example is just showing the usage of "PartnerDestinations_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PartnerDestinationResource created on azure + // for more information of creating PartnerDestinationResource, please refer to the document of PartnerDestinationResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string partnerDestinationName = "examplePartnerDestinationName1"; + ResourceIdentifier partnerDestinationResourceId = PartnerDestinationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerDestinationName); + PartnerDestinationResource partnerDestination = client.GetPartnerDestinationResource(partnerDestinationResourceId); + + // invoke the operation + await partnerDestination.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_PartnerDestinationsUpdate() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerDestinations_Update.json + // this example is just showing the usage of "PartnerDestinations_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PartnerDestinationResource created on azure + // for more information of creating PartnerDestinationResource, please refer to the document of PartnerDestinationResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string partnerDestinationName = "examplePartnerDestinationName1"; + ResourceIdentifier partnerDestinationResourceId = PartnerDestinationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerDestinationName); + PartnerDestinationResource partnerDestination = client.GetPartnerDestinationResource(partnerDestinationResourceId); + + // invoke the operation + PartnerDestinationPatch patch = new PartnerDestinationPatch + { + Tags = +{ +["tag1"] = "value1", +["tag2"] = "value2" +}, + }; + ArmOperation lro = await partnerDestination.UpdateAsync(WaitUntil.Completed, patch); + PartnerDestinationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PartnerDestinationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Activate_PartnerDestinationsActivate() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerDestinations_Activate.json + // this example is just showing the usage of "PartnerDestinations_Activate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PartnerDestinationResource created on azure + // for more information of creating PartnerDestinationResource, please refer to the document of PartnerDestinationResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string partnerDestinationName = "examplePartnerDestination1"; + ResourceIdentifier partnerDestinationResourceId = PartnerDestinationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerDestinationName); + PartnerDestinationResource partnerDestination = client.GetPartnerDestinationResource(partnerDestinationResourceId); + + // invoke the operation + PartnerDestinationResource result = await partnerDestination.ActivateAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PartnerDestinationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceChannelCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceChannelCollection.cs index d77e9aea3701..b901fbbcdbb3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceChannelCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceChannelCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_PartnerNamespaceChannelCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ChannelsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_CreateOrUpdate.json // this example is just showing the usage of "Channels_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_ChannelsCreateOrUpdate() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerNamespaceName); @@ -46,7 +46,7 @@ public async Task CreateOrUpdate_ChannelsCreateOrUpdate() ChannelType = PartnerNamespaceChannelType.PartnerTopic, PartnerTopicInfo = new PartnerTopicInfo { - AzureSubscriptionId = Guid.Parse("5b4b650e-28b9-4790-b3ab-ddbd88d727c4"), + AzureSubscriptionId = Guid.Parse("8f6b6269-84f2-4d09-9e31-1127efcd1e40"), ResourceGroupName = "examplerg2", Name = "examplePartnerTopic1", Source = "ContosoCorp.Accounts.User1", @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_ChannelsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_ChannelsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Get.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Get_ChannelsGet() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerNamespaceName); @@ -102,7 +102,7 @@ public async Task Get_ChannelsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ChannelsListByPartnerNamespace() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_ListByPartnerNamespace.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_ListByPartnerNamespace.json // this example is just showing the usage of "Channels_ListByPartnerNamespace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task GetAll_ChannelsListByPartnerNamespace() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerNamespaceName); @@ -138,7 +138,7 @@ public async Task GetAll_ChannelsListByPartnerNamespace() [Ignore("Only validating compilation of examples")] public async Task Exists_ChannelsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Get.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task Exists_ChannelsGet() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerNamespaceName); @@ -168,7 +168,7 @@ public async Task Exists_ChannelsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ChannelsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Get.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetIfExists_ChannelsGet() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerNamespaceName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceChannelResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceChannelResource.cs index 11121e603d5c..53d5f667815d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceChannelResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceChannelResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PartnerNamespaceChannelResource [Ignore("Only validating compilation of examples")] public async Task Get_ChannelsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Get.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_ChannelsGet() // this example assumes you already have this PartnerNamespaceChannelResource created on azure // for more information of creating PartnerNamespaceChannelResource, please refer to the document of PartnerNamespaceChannelResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; string channelName = "exampleChannelName1"; @@ -51,7 +51,7 @@ public async Task Get_ChannelsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ChannelsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Delete.json // this example is just showing the usage of "Channels_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Delete_ChannelsDelete() // this example assumes you already have this PartnerNamespaceChannelResource created on azure // for more information of creating PartnerNamespaceChannelResource, please refer to the document of PartnerNamespaceChannelResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; string channelName = "exampleEventChannelName1"; @@ -78,7 +78,7 @@ public async Task Delete_ChannelsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ChannelsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Update.json // this example is just showing the usage of "Channels_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_ChannelsUpdate() // this example assumes you already have this PartnerNamespaceChannelResource created on azure // for more information of creating PartnerNamespaceChannelResource, please refer to the document of PartnerNamespaceChannelResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; string channelName = "exampleChannelName1"; @@ -109,7 +109,7 @@ public async Task Update_ChannelsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetFullUri_ChannelsGetFullUrl() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_GetFullUrl.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_GetFullUrl.json // this example is just showing the usage of "Channels_GetFullUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task GetFullUri_ChannelsGetFullUrl() // this example assumes you already have this PartnerNamespaceChannelResource created on azure // for more information of creating PartnerNamespaceChannelResource, please refer to the document of PartnerNamespaceChannelResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplenamespace"; string channelName = "examplechannel"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceCollection.cs index 9ed92c0fdce5..db90e6fd43f3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_PartnerNamespaceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PartnerNamespacesCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerNamespaces_CreateOrUpdate.json // this example is just showing the usage of "PartnerNamespaces_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_PartnerNamespacesCreateOrUpdate() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -42,7 +42,7 @@ public async Task CreateOrUpdate_PartnerNamespacesCreateOrUpdate() string partnerNamespaceName = "examplePartnerNamespaceName1"; PartnerNamespaceData data = new PartnerNamespaceData(new AzureLocation("westus")) { - PartnerRegistrationFullyQualifiedId = new ResourceIdentifier("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1"), + PartnerRegistrationFullyQualifiedId = new ResourceIdentifier("/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1"), Tags = { ["tag1"] = "value1", @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_PartnerNamespacesCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PartnerNamespacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerNamespaces_Get.json // this example is just showing the usage of "PartnerNamespaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,7 +73,7 @@ public async Task Get_PartnerNamespacesGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -96,7 +96,7 @@ public async Task Get_PartnerNamespacesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PartnerNamespacesListByResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_ListByResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerNamespaces_ListByResourceGroup.json // this example is just showing the usage of "PartnerNamespaces_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task GetAll_PartnerNamespacesListByResourceGroup() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -131,7 +131,7 @@ public async Task GetAll_PartnerNamespacesListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_PartnerNamespacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerNamespaces_Get.json // this example is just showing the usage of "PartnerNamespaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +141,7 @@ public async Task Exists_PartnerNamespacesGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -160,7 +160,7 @@ public async Task Exists_PartnerNamespacesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PartnerNamespacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerNamespaces_Get.json // this example is just showing the usage of "PartnerNamespaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_PartnerNamespacesGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespacePrivateLinkResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespacePrivateLinkResource.cs index c56b2f0fc331..8de75782677c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespacePrivateLinkResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespacePrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_PartnerNamespacePrivateLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_PrivateLinkResourcesGet() // this example assumes you already have this PartnerNamespacePrivateLinkResource created on azure // for more information of creating PartnerNamespacePrivateLinkResource, please refer to the document of PartnerNamespacePrivateLinkResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; string privateLinkResourceName = "topic"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespacePrivateLinkResourceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespacePrivateLinkResourceCollection.cs index 335b25a67621..7a66b5a9d97a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespacePrivateLinkResourceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespacePrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_PartnerNamespacePrivateLinkResourceCollection [Ignore("Only validating compilation of examples")] public async Task Get_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_PrivateLinkResourcesGet() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -53,7 +53,7 @@ public async Task Get_PrivateLinkResourcesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateLinkResourcesListByResource() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_ListByResource.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_ListByResource.json // this example is just showing the usage of "PrivateLinkResources_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task GetAll_PrivateLinkResourcesListByResource() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -89,7 +89,7 @@ public async Task GetAll_PrivateLinkResourcesListByResource() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Exists_PrivateLinkResourcesGet() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); @@ -119,7 +119,7 @@ public async Task Exists_PrivateLinkResourcesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateLinkResourcesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PrivateLinkResources_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_PrivateLinkResourcesGet() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string parentName = "exampletopic1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, parentName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceResource.cs index 80671730f6c5..8ffea090df20 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerNamespaceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PartnerNamespaceResource [Ignore("Only validating compilation of examples")] public async Task Get_PartnerNamespacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerNamespaces_Get.json // this example is just showing the usage of "PartnerNamespaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_PartnerNamespacesGet() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerNamespaceName); @@ -50,7 +50,7 @@ public async Task Get_PartnerNamespacesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PartnerNamespacesDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerNamespaces_Delete.json // this example is just showing the usage of "PartnerNamespaces_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Delete_PartnerNamespacesDelete() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerNamespaceName); @@ -76,7 +76,7 @@ public async Task Delete_PartnerNamespacesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PartnerNamespacesUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerNamespaces_Update.json // this example is just showing the usage of "PartnerNamespaces_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_PartnerNamespacesUpdate() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerNamespaceName); @@ -109,7 +109,7 @@ public async Task Update_PartnerNamespacesUpdate() [Ignore("Only validating compilation of examples")] public async Task GetSharedAccessKeys_PartnerNamespacesListSharedAccessKeys() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_ListSharedAccessKeys.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerNamespaces_ListSharedAccessKeys.json // this example is just showing the usage of "PartnerNamespaces_ListSharedAccessKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task GetSharedAccessKeys_PartnerNamespacesListSharedAccessKeys() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerNamespaceName); @@ -135,7 +135,7 @@ public async Task GetSharedAccessKeys_PartnerNamespacesListSharedAccessKeys() [Ignore("Only validating compilation of examples")] public async Task RegenerateKey_PartnerNamespacesRegenerateKey() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_RegenerateKey.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerNamespaces_RegenerateKey.json // this example is just showing the usage of "PartnerNamespaces_RegenerateKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task RegenerateKey_PartnerNamespacesRegenerateKey() // this example assumes you already have this PartnerNamespaceResource created on azure // for more information of creating PartnerNamespaceResource, please refer to the document of PartnerNamespaceResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerNamespaceName = "examplePartnerNamespaceName1"; ResourceIdentifier partnerNamespaceResourceId = PartnerNamespaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerNamespaceName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerRegistrationCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerRegistrationCollection.cs index 6172e9017323..2a4a13d9d67d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerRegistrationCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerRegistrationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_PartnerRegistrationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PartnerRegistrationsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerRegistrations_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerRegistrations_CreateOrUpdate.json // this example is just showing the usage of "PartnerRegistrations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_PartnerRegistrationsCreateOrUpdate() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_PartnerRegistrationsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PartnerRegistrationsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerRegistrations_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerRegistrations_Get.json // this example is just showing the usage of "PartnerRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,7 +73,7 @@ public async Task Get_PartnerRegistrationsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -96,7 +96,7 @@ public async Task Get_PartnerRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PartnerRegistrationsListByResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerRegistrations_ListByResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerRegistrations_ListByResourceGroup.json // this example is just showing the usage of "PartnerRegistrations_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task GetAll_PartnerRegistrationsListByResourceGroup() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -131,7 +131,7 @@ public async Task GetAll_PartnerRegistrationsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_PartnerRegistrationsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerRegistrations_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerRegistrations_Get.json // this example is just showing the usage of "PartnerRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +141,7 @@ public async Task Exists_PartnerRegistrationsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -160,7 +160,7 @@ public async Task Exists_PartnerRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PartnerRegistrationsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerRegistrations_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerRegistrations_Get.json // this example is just showing the usage of "PartnerRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_PartnerRegistrationsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerRegistrationResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerRegistrationResource.cs index d9b421b6fd13..79a6c1c50734 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerRegistrationResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerRegistrationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PartnerRegistrationResource [Ignore("Only validating compilation of examples")] public async Task Get_PartnerRegistrationsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerRegistrations_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerRegistrations_Get.json // this example is just showing the usage of "PartnerRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_PartnerRegistrationsGet() // this example assumes you already have this PartnerRegistrationResource created on azure // for more information of creating PartnerRegistrationResource, please refer to the document of PartnerRegistrationResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerRegistrationName = "examplePartnerRegistrationName1"; ResourceIdentifier partnerRegistrationResourceId = PartnerRegistrationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerRegistrationName); @@ -50,7 +50,7 @@ public async Task Get_PartnerRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PartnerRegistrationsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerRegistrations_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerRegistrations_Delete.json // this example is just showing the usage of "PartnerRegistrations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Delete_PartnerRegistrationsDelete() // this example assumes you already have this PartnerRegistrationResource created on azure // for more information of creating PartnerRegistrationResource, please refer to the document of PartnerRegistrationResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerRegistrationName = "examplePartnerRegistrationName1"; ResourceIdentifier partnerRegistrationResourceId = PartnerRegistrationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerRegistrationName); @@ -76,7 +76,7 @@ public async Task Delete_PartnerRegistrationsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PartnerRegistrationsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerRegistrations_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerRegistrations_Update.json // this example is just showing the usage of "PartnerRegistrations_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_PartnerRegistrationsUpdate() // this example assumes you already have this PartnerRegistrationResource created on azure // for more information of creating PartnerRegistrationResource, please refer to the document of PartnerRegistrationResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerRegistrationName = "examplePartnerRegistrationName1"; ResourceIdentifier partnerRegistrationResourceId = PartnerRegistrationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerRegistrationName); @@ -97,8 +97,7 @@ public async Task Update_PartnerRegistrationsUpdate() { Tags = { -["tag1"] = "value1", -["tag2"] = "value2" +["NewKey"] = "NewValue" }, }; await partnerRegistration.UpdateAsync(WaitUntil.Completed, patch); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicCollection.cs index e2fe029f7543..8a442f830224 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_PartnerTopicCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PartnerTopicsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopics_CreateOrUpdate.json // this example is just showing the usage of "PartnerTopics_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_PartnerTopicsCreateOrUpdate() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -62,7 +62,7 @@ public async Task CreateOrUpdate_PartnerTopicsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PartnerTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopics_Get.json // this example is just showing the usage of "PartnerTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task Get_PartnerTopicsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -95,7 +95,7 @@ public async Task Get_PartnerTopicsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PartnerTopicsListByResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_ListByResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopics_ListByResourceGroup.json // this example is just showing the usage of "PartnerTopics_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +105,7 @@ public async Task GetAll_PartnerTopicsListByResourceGroup() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -130,7 +130,7 @@ public async Task GetAll_PartnerTopicsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_PartnerTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopics_Get.json // this example is just showing the usage of "PartnerTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task Exists_PartnerTopicsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -159,7 +159,7 @@ public async Task Exists_PartnerTopicsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PartnerTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopics_Get.json // this example is just showing the usage of "PartnerTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_PartnerTopicsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicEventSubscriptionCollection.cs index 1cd625039c56..d8a2405baf3e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicEventSubscriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_PartnerTopicEventSubscriptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PartnerTopicEventSubscriptionsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopicEventSubscriptions_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopicEventSubscriptions_CreateOrUpdate.json // this example is just showing the usage of "PartnerTopicEventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_PartnerTopicEventSubscriptionsCreateOrUpdate() // this example assumes you already have this PartnerTopicResource created on azure // for more information of creating PartnerTopicResource, please refer to the document of PartnerTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; ResourceIdentifier partnerTopicResourceId = PartnerTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerTopicName); @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_PartnerTopicEventSubscriptionsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PartnerTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopicEventSubscriptions_Get.json // this example is just showing the usage of "PartnerTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Get_PartnerTopicEventSubscriptionsGet() // this example assumes you already have this PartnerTopicResource created on azure // for more information of creating PartnerTopicResource, please refer to the document of PartnerTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; ResourceIdentifier partnerTopicResourceId = PartnerTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerTopicName); @@ -102,7 +102,7 @@ public async Task Get_PartnerTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PartnerTopicEventSubscriptionsListByPartnerTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopicEventSubscriptions_ListByPartnerTopic.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopicEventSubscriptions_ListByPartnerTopic.json // this example is just showing the usage of "PartnerTopicEventSubscriptions_ListByPartnerTopic" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task GetAll_PartnerTopicEventSubscriptionsListByPartnerTopic() // this example assumes you already have this PartnerTopicResource created on azure // for more information of creating PartnerTopicResource, please refer to the document of PartnerTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; ResourceIdentifier partnerTopicResourceId = PartnerTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerTopicName); @@ -138,7 +138,7 @@ public async Task GetAll_PartnerTopicEventSubscriptionsListByPartnerTopic() [Ignore("Only validating compilation of examples")] public async Task Exists_PartnerTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopicEventSubscriptions_Get.json // this example is just showing the usage of "PartnerTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task Exists_PartnerTopicEventSubscriptionsGet() // this example assumes you already have this PartnerTopicResource created on azure // for more information of creating PartnerTopicResource, please refer to the document of PartnerTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; ResourceIdentifier partnerTopicResourceId = PartnerTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerTopicName); @@ -168,7 +168,7 @@ public async Task Exists_PartnerTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PartnerTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopicEventSubscriptions_Get.json // this example is just showing the usage of "PartnerTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetIfExists_PartnerTopicEventSubscriptionsGet() // this example assumes you already have this PartnerTopicResource created on azure // for more information of creating PartnerTopicResource, please refer to the document of PartnerTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; ResourceIdentifier partnerTopicResourceId = PartnerTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerTopicName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicEventSubscriptionResource.cs index 428039c27d56..efa7cab37061 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicEventSubscriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PartnerTopicEventSubscriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_PartnerTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopicEventSubscriptions_Get.json // this example is just showing the usage of "PartnerTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_PartnerTopicEventSubscriptionsGet() // this example assumes you already have this PartnerTopicEventSubscriptionResource created on azure // for more information of creating PartnerTopicEventSubscriptionResource, please refer to the document of PartnerTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; string eventSubscriptionName = "examplesubscription1"; @@ -51,7 +51,7 @@ public async Task Get_PartnerTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PartnerTopicEventSubscriptionsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopicEventSubscriptions_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopicEventSubscriptions_Delete.json // this example is just showing the usage of "PartnerTopicEventSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Delete_PartnerTopicEventSubscriptionsDelete() // this example assumes you already have this PartnerTopicEventSubscriptionResource created on azure // for more information of creating PartnerTopicEventSubscriptionResource, please refer to the document of PartnerTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; string eventSubscriptionName = "examplesubscription1"; @@ -78,7 +78,7 @@ public async Task Delete_PartnerTopicEventSubscriptionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PartnerTopicEventSubscriptionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopicEventSubscriptions_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopicEventSubscriptions_Update.json // this example is just showing the usage of "PartnerTopicEventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_PartnerTopicEventSubscriptionsUpdate() // this example assumes you already have this PartnerTopicEventSubscriptionResource created on azure // for more information of creating PartnerTopicEventSubscriptionResource, please refer to the document of PartnerTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; string eventSubscriptionName = "exampleEventSubscriptionName1"; @@ -124,7 +124,7 @@ public async Task Update_PartnerTopicEventSubscriptionsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetFullUri_PartnerTopicEventSubscriptionsGetFullUrl() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopicEventSubscriptions_GetFullUrl.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopicEventSubscriptions_GetFullUrl.json // this example is just showing the usage of "PartnerTopicEventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task GetFullUri_PartnerTopicEventSubscriptionsGetFullUrl() // this example assumes you already have this PartnerTopicEventSubscriptionResource created on azure // for more information of creating PartnerTopicEventSubscriptionResource, please refer to the document of PartnerTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; string eventSubscriptionName = "examplesubscription1"; @@ -151,7 +151,7 @@ public async Task GetFullUri_PartnerTopicEventSubscriptionsGetFullUrl() [Ignore("Only validating compilation of examples")] public async Task GetDeliveryAttributes_PartnerTopicEventSubscriptionsGetDeliveryAttributes() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopicEventSubscriptions_GetDeliveryAttributes.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopicEventSubscriptions_GetDeliveryAttributes.json // this example is just showing the usage of "PartnerTopicEventSubscriptions_GetDeliveryAttributes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task GetDeliveryAttributes_PartnerTopicEventSubscriptionsGetDeliver // this example assumes you already have this PartnerTopicEventSubscriptionResource created on azure // for more information of creating PartnerTopicEventSubscriptionResource, please refer to the document of PartnerTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; string eventSubscriptionName = "examplesubscription1"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicResource.cs index 7b004a1cbcbb..32628f9cff69 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_PartnerTopicResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PartnerTopicResource [Ignore("Only validating compilation of examples")] public async Task Get_PartnerTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopics_Get.json // this example is just showing the usage of "PartnerTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_PartnerTopicsGet() // this example assumes you already have this PartnerTopicResource created on azure // for more information of creating PartnerTopicResource, please refer to the document of PartnerTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopicName1"; ResourceIdentifier partnerTopicResourceId = PartnerTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerTopicName); @@ -50,7 +50,7 @@ public async Task Get_PartnerTopicsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PartnerTopicsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopics_Delete.json // this example is just showing the usage of "PartnerTopics_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Delete_PartnerTopicsDelete() // this example assumes you already have this PartnerTopicResource created on azure // for more information of creating PartnerTopicResource, please refer to the document of PartnerTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopicName1"; ResourceIdentifier partnerTopicResourceId = PartnerTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerTopicName); @@ -76,7 +76,7 @@ public async Task Delete_PartnerTopicsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PartnerTopicsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopics_Update.json // this example is just showing the usage of "PartnerTopics_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_PartnerTopicsUpdate() // this example assumes you already have this PartnerTopicResource created on azure // for more information of creating PartnerTopicResource, please refer to the document of PartnerTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopicName1"; ResourceIdentifier partnerTopicResourceId = PartnerTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerTopicName); @@ -114,7 +114,7 @@ public async Task Update_PartnerTopicsUpdate() [Ignore("Only validating compilation of examples")] public async Task Activate_PartnerTopicsActivate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Activate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopics_Activate.json // this example is just showing the usage of "PartnerTopics_Activate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Activate_PartnerTopicsActivate() // this example assumes you already have this PartnerTopicResource created on azure // for more information of creating PartnerTopicResource, please refer to the document of PartnerTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; ResourceIdentifier partnerTopicResourceId = PartnerTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerTopicName); @@ -144,7 +144,7 @@ public async Task Activate_PartnerTopicsActivate() [Ignore("Only validating compilation of examples")] public async Task Deactivate_PartnerTopicsDeactivate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Deactivate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopics_Deactivate.json // this example is just showing the usage of "PartnerTopics_Deactivate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -154,7 +154,7 @@ public async Task Deactivate_PartnerTopicsDeactivate() // this example assumes you already have this PartnerTopicResource created on azure // for more information of creating PartnerTopicResource, please refer to the document of PartnerTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string partnerTopicName = "examplePartnerTopic1"; ResourceIdentifier partnerTopicResourceId = PartnerTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, partnerTopicName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index aecf98583716..23bc5ea315ce 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetEventGridDomains_DomainsListBySubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_ListBySubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_ListBySubscription.json // this example is just showing the usage of "Domains_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task GetEventGridDomains_DomainsListBySubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -51,7 +51,7 @@ public async Task GetEventGridDomains_DomainsListBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetEventGridNamespaces_NamespacesListBySubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_ListBySubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_ListBySubscription.json // this example is just showing the usage of "Namespaces_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,10 +80,10 @@ public async Task GetEventGridNamespaces_NamespacesListBySubscription() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetEventGridTopics_TopicsListBySubscription() + public async Task GetPartnerConfigurations_PartnerConfigurationsListBySubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_ListBySubscription.json - // this example is just showing the usage of "Topics_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerConfigurations_ListBySubscription.json + // this example is just showing the usage of "PartnerConfigurations_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -92,16 +92,16 @@ public async Task GetEventGridTopics_TopicsListBySubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (EventGridTopicResource item in subscriptionResource.GetEventGridTopicsAsync()) + await foreach (PartnerConfigurationResource item in subscriptionResource.GetPartnerConfigurationsAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - EventGridTopicData resourceData = item.Data; + PartnerConfigurationData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -111,10 +111,10 @@ public async Task GetEventGridTopics_TopicsListBySubscription() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetPartnerConfigurations_PartnerConfigurationsListBySubscription() + public async Task GetPartnerDestinations_PartnerDestinationsListBySubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerConfigurations_ListBySubscription.json - // this example is just showing the usage of "PartnerConfigurations_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerDestinations_ListBySubscription.json + // this example is just showing the usage of "PartnerDestinations_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -123,16 +123,16 @@ public async Task GetPartnerConfigurations_PartnerConfigurationsListBySubscripti // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (PartnerConfigurationResource item in subscriptionResource.GetPartnerConfigurationsAsync()) + await foreach (PartnerDestinationResource item in subscriptionResource.GetPartnerDestinationsAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - PartnerConfigurationData resourceData = item.Data; + PartnerDestinationData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -144,7 +144,7 @@ public async Task GetPartnerConfigurations_PartnerConfigurationsListBySubscripti [Ignore("Only validating compilation of examples")] public async Task GetPartnerNamespaces_PartnerNamespacesListBySubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_ListBySubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerNamespaces_ListBySubscription.json // this example is just showing the usage of "PartnerNamespaces_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -154,7 +154,7 @@ public async Task GetPartnerNamespaces_PartnerNamespacesListBySubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -175,7 +175,7 @@ public async Task GetPartnerNamespaces_PartnerNamespacesListBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetPartnerRegistrations_PartnerRegistrationsListBySubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerRegistrations_ListBySubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerRegistrations_ListBySubscription.json // this example is just showing the usage of "PartnerRegistrations_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -185,7 +185,7 @@ public async Task GetPartnerRegistrations_PartnerRegistrationsListBySubscription // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -206,7 +206,7 @@ public async Task GetPartnerRegistrations_PartnerRegistrationsListBySubscription [Ignore("Only validating compilation of examples")] public async Task GetPartnerTopics_PartnerTopicsListBySubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_ListBySubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/PartnerTopics_ListBySubscription.json // this example is just showing the usage of "PartnerTopics_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +216,7 @@ public async Task GetPartnerTopics_PartnerTopicsListBySubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -237,7 +237,7 @@ public async Task GetPartnerTopics_PartnerTopicsListBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetSystemTopics_SystemTopicsListBySubscription() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_ListBySubscription.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopics_ListBySubscription.json // this example is just showing the usage of "SystemTopics_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -247,7 +247,7 @@ public async Task GetSystemTopics_SystemTopicsListBySubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -263,5 +263,36 @@ public async Task GetSystemTopics_SystemTopicsListBySubscription() Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetEventGridTopics_TopicsListBySubscription() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_ListBySubscription.json + // this example is just showing the usage of "Topics_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (EventGridTopicResource item in subscriptionResource.GetEventGridTopicsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EventGridTopicData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicCollection.cs index d8e63a48cbf7..505cd8fcf9d5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SystemTopicCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SystemTopicsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopics_CreateOrUpdate.json // this example is just showing the usage of "SystemTopics_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_SystemTopicsCreateOrUpdate() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -42,7 +42,7 @@ public async Task CreateOrUpdate_SystemTopicsCreateOrUpdate() string systemTopicName = "exampleSystemTopic1"; SystemTopicData data = new SystemTopicData(new AzureLocation("westus2")) { - Source = new ResourceIdentifier("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e"), + Source = new ResourceIdentifier("/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e"), TopicType = "microsoft.storage.storageaccounts", Tags = { @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_SystemTopicsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_SystemTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopics_Get.json // this example is just showing the usage of "SystemTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,7 +74,7 @@ public async Task Get_SystemTopicsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -97,7 +97,7 @@ public async Task Get_SystemTopicsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_SystemTopicsListByResourceGroup() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_ListByResourceGroup.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopics_ListByResourceGroup.json // this example is just showing the usage of "SystemTopics_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,7 +107,7 @@ public async Task GetAll_SystemTopicsListByResourceGroup() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -132,7 +132,7 @@ public async Task GetAll_SystemTopicsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_SystemTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopics_Get.json // this example is just showing the usage of "SystemTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task Exists_SystemTopicsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -161,7 +161,7 @@ public async Task Exists_SystemTopicsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SystemTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopics_Get.json // this example is just showing the usage of "SystemTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task GetIfExists_SystemTopicsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicEventSubscriptionCollection.cs index 7eab5d6e2582..2f4f0a9e54d6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicEventSubscriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SystemTopicEventSubscriptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SystemTopicEventSubscriptionsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopicEventSubscriptions_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopicEventSubscriptions_CreateOrUpdate.json // this example is just showing the usage of "SystemTopicEventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_SystemTopicEventSubscriptionsCreateOrUpdate() // this example assumes you already have this SystemTopicResource created on azure // for more information of creating SystemTopicResource, please refer to the document of SystemTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; ResourceIdentifier systemTopicResourceId = SystemTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, systemTopicName); @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_SystemTopicEventSubscriptionsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_SystemTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopicEventSubscriptions_Get.json // this example is just showing the usage of "SystemTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Get_SystemTopicEventSubscriptionsGet() // this example assumes you already have this SystemTopicResource created on azure // for more information of creating SystemTopicResource, please refer to the document of SystemTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; ResourceIdentifier systemTopicResourceId = SystemTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, systemTopicName); @@ -102,7 +102,7 @@ public async Task Get_SystemTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_SystemTopicEventSubscriptionsListBySystemTopic() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopicEventSubscriptions_ListBySystemTopic.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopicEventSubscriptions_ListBySystemTopic.json // this example is just showing the usage of "SystemTopicEventSubscriptions_ListBySystemTopic" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task GetAll_SystemTopicEventSubscriptionsListBySystemTopic() // this example assumes you already have this SystemTopicResource created on azure // for more information of creating SystemTopicResource, please refer to the document of SystemTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; ResourceIdentifier systemTopicResourceId = SystemTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, systemTopicName); @@ -138,7 +138,7 @@ public async Task GetAll_SystemTopicEventSubscriptionsListBySystemTopic() [Ignore("Only validating compilation of examples")] public async Task Exists_SystemTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopicEventSubscriptions_Get.json // this example is just showing the usage of "SystemTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task Exists_SystemTopicEventSubscriptionsGet() // this example assumes you already have this SystemTopicResource created on azure // for more information of creating SystemTopicResource, please refer to the document of SystemTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; ResourceIdentifier systemTopicResourceId = SystemTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, systemTopicName); @@ -168,7 +168,7 @@ public async Task Exists_SystemTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SystemTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopicEventSubscriptions_Get.json // this example is just showing the usage of "SystemTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetIfExists_SystemTopicEventSubscriptionsGet() // this example assumes you already have this SystemTopicResource created on azure // for more information of creating SystemTopicResource, please refer to the document of SystemTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; ResourceIdentifier systemTopicResourceId = SystemTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, systemTopicName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicEventSubscriptionResource.cs index d4909cb7904e..fe0250d40bbe 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicEventSubscriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SystemTopicEventSubscriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_SystemTopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopicEventSubscriptions_Get.json // this example is just showing the usage of "SystemTopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_SystemTopicEventSubscriptionsGet() // this example assumes you already have this SystemTopicEventSubscriptionResource created on azure // for more information of creating SystemTopicEventSubscriptionResource, please refer to the document of SystemTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; string eventSubscriptionName = "examplesubscription1"; @@ -51,7 +51,7 @@ public async Task Get_SystemTopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_SystemTopicEventSubscriptionsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopicEventSubscriptions_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopicEventSubscriptions_Delete.json // this example is just showing the usage of "SystemTopicEventSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Delete_SystemTopicEventSubscriptionsDelete() // this example assumes you already have this SystemTopicEventSubscriptionResource created on azure // for more information of creating SystemTopicEventSubscriptionResource, please refer to the document of SystemTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; string eventSubscriptionName = "examplesubscription1"; @@ -78,7 +78,7 @@ public async Task Delete_SystemTopicEventSubscriptionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_SystemTopicEventSubscriptionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopicEventSubscriptions_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopicEventSubscriptions_Update.json // this example is just showing the usage of "SystemTopicEventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_SystemTopicEventSubscriptionsUpdate() // this example assumes you already have this SystemTopicEventSubscriptionResource created on azure // for more information of creating SystemTopicEventSubscriptionResource, please refer to the document of SystemTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; string eventSubscriptionName = "exampleEventSubscriptionName1"; @@ -122,10 +122,10 @@ public async Task Update_SystemTopicEventSubscriptionsUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetFullUri_SystemTopicEventSubscriptionsGetFullUrl() + public async Task GetDeliveryAttributes_SystemTopicEventSubscriptionsGetDeliveryAttributes() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopicEventSubscriptions_GetFullUrl.json - // this example is just showing the usage of "SystemTopicEventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopicEventSubscriptions_GetDeliveryAttributes.json + // this example is just showing the usage of "SystemTopicEventSubscriptions_GetDeliveryAttributes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -134,25 +134,28 @@ public async Task GetFullUri_SystemTopicEventSubscriptionsGetFullUrl() // this example assumes you already have this SystemTopicEventSubscriptionResource created on azure // for more information of creating SystemTopicEventSubscriptionResource, please refer to the document of SystemTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier systemTopicEventSubscriptionResourceId = SystemTopicEventSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, systemTopicName, eventSubscriptionName); SystemTopicEventSubscriptionResource systemTopicEventSubscription = client.GetSystemTopicEventSubscriptionResource(systemTopicEventSubscriptionResourceId); - // invoke the operation - EventSubscriptionFullUri result = await systemTopicEventSubscription.GetFullUriAsync(); + // invoke the operation and iterate over the result + await foreach (DeliveryAttributeMapping item in systemTopicEventSubscription.GetDeliveryAttributesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetDeliveryAttributes_SystemTopicEventSubscriptionsGetDeliveryAttributes() + public async Task GetFullUri_SystemTopicEventSubscriptionsGetFullUrl() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopicEventSubscriptions_GetDeliveryAttributes.json - // this example is just showing the usage of "SystemTopicEventSubscriptions_GetDeliveryAttributes" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopicEventSubscriptions_GetFullUrl.json + // this example is just showing the usage of "SystemTopicEventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -161,20 +164,17 @@ public async Task GetDeliveryAttributes_SystemTopicEventSubscriptionsGetDelivery // this example assumes you already have this SystemTopicEventSubscriptionResource created on azure // for more information of creating SystemTopicEventSubscriptionResource, please refer to the document of SystemTopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier systemTopicEventSubscriptionResourceId = SystemTopicEventSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, systemTopicName, eventSubscriptionName); SystemTopicEventSubscriptionResource systemTopicEventSubscription = client.GetSystemTopicEventSubscriptionResource(systemTopicEventSubscriptionResourceId); - // invoke the operation and iterate over the result - await foreach (DeliveryAttributeMapping item in systemTopicEventSubscription.GetDeliveryAttributesAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + EventSubscriptionFullUri result = await systemTopicEventSubscription.GetFullUriAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicResource.cs index 97b784008edd..2dfecfc507b1 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_SystemTopicResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SystemTopicResource [Ignore("Only validating compilation of examples")] public async Task Get_SystemTopicsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopics_Get.json // this example is just showing the usage of "SystemTopics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_SystemTopicsGet() // this example assumes you already have this SystemTopicResource created on azure // for more information of creating SystemTopicResource, please refer to the document of SystemTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic2"; ResourceIdentifier systemTopicResourceId = SystemTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, systemTopicName); @@ -50,7 +50,7 @@ public async Task Get_SystemTopicsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_SystemTopicsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopics_Delete.json // this example is just showing the usage of "SystemTopics_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Delete_SystemTopicsDelete() // this example assumes you already have this SystemTopicResource created on azure // for more information of creating SystemTopicResource, please refer to the document of SystemTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; ResourceIdentifier systemTopicResourceId = SystemTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, systemTopicName); @@ -76,7 +76,7 @@ public async Task Delete_SystemTopicsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_SystemTopicsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopics_Update.json // this example is just showing the usage of "SystemTopics_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_SystemTopicsUpdate() // this example assumes you already have this SystemTopicResource created on azure // for more information of creating SystemTopicResource, please refer to the document of SystemTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string systemTopicName = "exampleSystemTopic1"; ResourceIdentifier systemTopicResourceId = SystemTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, systemTopicName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicEventSubscriptionCollection.cs index b4cfe88f411a..34ffdea07d82 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicEventSubscriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_TopicEventSubscriptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TopicEventSubscriptionsCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicEventSubscriptions_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicEventSubscriptions_CreateOrUpdate.json // this example is just showing the usage of "TopicEventSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_TopicEventSubscriptionsCreateOrUpdate() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampleTopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, topicName); @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_TopicEventSubscriptionsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_TopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicEventSubscriptions_Get.json // this example is just showing the usage of "TopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Get_TopicEventSubscriptionsGet() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampleTopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, topicName); @@ -102,7 +102,7 @@ public async Task Get_TopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TopicEventSubscriptionsList() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicEventSubscriptions_List.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicEventSubscriptions_List.json // this example is just showing the usage of "TopicEventSubscriptions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task GetAll_TopicEventSubscriptionsList() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampleTopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, topicName); @@ -138,7 +138,7 @@ public async Task GetAll_TopicEventSubscriptionsList() [Ignore("Only validating compilation of examples")] public async Task Exists_TopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicEventSubscriptions_Get.json // this example is just showing the usage of "TopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task Exists_TopicEventSubscriptionsGet() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampleTopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, topicName); @@ -168,7 +168,7 @@ public async Task Exists_TopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicEventSubscriptions_Get.json // this example is just showing the usage of "TopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetIfExists_TopicEventSubscriptionsGet() // this example assumes you already have this EventGridTopicResource created on azure // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampleTopic1"; ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, topicName); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicEventSubscriptionResource.cs index d79545408da0..7cbeebe4f066 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicEventSubscriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_TopicEventSubscriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_TopicEventSubscriptionsGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicEventSubscriptions_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicEventSubscriptions_Get.json // this example is just showing the usage of "TopicEventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_TopicEventSubscriptionsGet() // this example assumes you already have this TopicEventSubscriptionResource created on azure // for more information of creating TopicEventSubscriptionResource, please refer to the document of TopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampleTopic1"; string eventSubscriptionName = "examplesubscription1"; @@ -51,7 +51,7 @@ public async Task Get_TopicEventSubscriptionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TopicEventSubscriptionsDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicEventSubscriptions_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicEventSubscriptions_Delete.json // this example is just showing the usage of "TopicEventSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,10 +61,10 @@ public async Task Delete_TopicEventSubscriptionsDelete() // this example assumes you already have this TopicEventSubscriptionResource created on azure // for more information of creating TopicEventSubscriptionResource, please refer to the document of TopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; - string topicName = "exampleTopic"; - string eventSubscriptionName = "examplesubscription"; + string topicName = "exampleTopic1"; + string eventSubscriptionName = "examplesubscription1"; ResourceIdentifier topicEventSubscriptionResourceId = TopicEventSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, topicName, eventSubscriptionName); TopicEventSubscriptionResource topicEventSubscription = client.GetTopicEventSubscriptionResource(topicEventSubscriptionResourceId); @@ -78,7 +78,7 @@ public async Task Delete_TopicEventSubscriptionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TopicEventSubscriptionsUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicEventSubscriptions_Update.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicEventSubscriptions_Update.json // this example is just showing the usage of "TopicEventSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_TopicEventSubscriptionsUpdate() // this example assumes you already have this TopicEventSubscriptionResource created on azure // for more information of creating TopicEventSubscriptionResource, please refer to the document of TopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampleTopic1"; string eventSubscriptionName = "exampleEventSubscriptionName1"; @@ -124,7 +124,7 @@ public async Task Update_TopicEventSubscriptionsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetDeliveryAttributes_TopicEventSubscriptionsGetDeliveryAttributes() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicEventSubscriptions_GetDeliveryAttributes.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicEventSubscriptions_GetDeliveryAttributes.json // this example is just showing the usage of "TopicEventSubscriptions_GetDeliveryAttributes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task GetDeliveryAttributes_TopicEventSubscriptionsGetDeliveryAttrib // this example assumes you already have this TopicEventSubscriptionResource created on azure // for more information of creating TopicEventSubscriptionResource, please refer to the document of TopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampleTopic1"; string eventSubscriptionName = "examplesubscription1"; @@ -154,7 +154,7 @@ public async Task GetDeliveryAttributes_TopicEventSubscriptionsGetDeliveryAttrib [Ignore("Only validating compilation of examples")] public async Task GetFullUri_TopicEventSubscriptionsGetFullUrl() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicEventSubscriptions_GetFullUrl.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicEventSubscriptions_GetFullUrl.json // this example is just showing the usage of "TopicEventSubscriptions_GetFullUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task GetFullUri_TopicEventSubscriptionsGetFullUrl() // this example assumes you already have this TopicEventSubscriptionResource created on azure // for more information of creating TopicEventSubscriptionResource, please refer to the document of TopicEventSubscriptionResource - string subscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"; + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; string resourceGroupName = "examplerg"; string topicName = "exampleTopic1"; string eventSubscriptionName = "examplesubscription1"; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicNetworkSecurityPerimeterConfigurationCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicNetworkSecurityPerimeterConfigurationCollection.cs new file mode 100644 index 000000000000..59d9d3c06ebf --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicNetworkSecurityPerimeterConfigurationCollection.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.EventGrid.Samples +{ + public partial class Sample_TopicNetworkSecurityPerimeterConfigurationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_NetworkSecurityPerimeterConfigurationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this EventGridTopicResource created on azure + // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + EventGridTopicResource eventGridTopic = client.GetEventGridTopicResource(eventGridTopicResourceId); + + // get the collection of this TopicNetworkSecurityPerimeterConfigurationResource + TopicNetworkSecurityPerimeterConfigurationCollection collection = eventGridTopic.GetTopicNetworkSecurityPerimeterConfigurations(); + + // invoke the operation + string perimeterGuid = "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter"; + string associationName = "someAssociation"; + TopicNetworkSecurityPerimeterConfigurationResource result = await collection.GetAsync(perimeterGuid, associationName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_NetworkSecurityPerimeterConfigurationsList() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_List.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this EventGridTopicResource created on azure + // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + EventGridTopicResource eventGridTopic = client.GetEventGridTopicResource(eventGridTopicResourceId); + + // get the collection of this TopicNetworkSecurityPerimeterConfigurationResource + TopicNetworkSecurityPerimeterConfigurationCollection collection = eventGridTopic.GetTopicNetworkSecurityPerimeterConfigurations(); + + // invoke the operation and iterate over the result + await foreach (NetworkSecurityPerimeterConfigurationData item in collection.GetAllAsync()) + { + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {item.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_NetworkSecurityPerimeterConfigurationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this EventGridTopicResource created on azure + // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + EventGridTopicResource eventGridTopic = client.GetEventGridTopicResource(eventGridTopicResourceId); + + // get the collection of this TopicNetworkSecurityPerimeterConfigurationResource + TopicNetworkSecurityPerimeterConfigurationCollection collection = eventGridTopic.GetTopicNetworkSecurityPerimeterConfigurations(); + + // invoke the operation + string perimeterGuid = "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter"; + string associationName = "someAssociation"; + bool result = await collection.ExistsAsync(perimeterGuid, associationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_NetworkSecurityPerimeterConfigurationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this EventGridTopicResource created on azure + // for more information of creating EventGridTopicResource, please refer to the document of EventGridTopicResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + ResourceIdentifier eventGridTopicResourceId = EventGridTopicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + EventGridTopicResource eventGridTopic = client.GetEventGridTopicResource(eventGridTopicResourceId); + + // get the collection of this TopicNetworkSecurityPerimeterConfigurationResource + TopicNetworkSecurityPerimeterConfigurationCollection collection = eventGridTopic.GetTopicNetworkSecurityPerimeterConfigurations(); + + // invoke the operation + string perimeterGuid = "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter"; + string associationName = "someAssociation"; + NullableResponse response = await collection.GetIfExistsAsync(perimeterGuid, associationName); + TopicNetworkSecurityPerimeterConfigurationResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicNetworkSecurityPerimeterConfigurationResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicNetworkSecurityPerimeterConfigurationResource.cs new file mode 100644 index 000000000000..12f4caafbbce --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicNetworkSecurityPerimeterConfigurationResource.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.EventGrid.Samples +{ + public partial class Sample_TopicNetworkSecurityPerimeterConfigurationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_NetworkSecurityPerimeterConfigurationsGet() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TopicNetworkSecurityPerimeterConfigurationResource created on azure + // for more information of creating TopicNetworkSecurityPerimeterConfigurationResource, please refer to the document of TopicNetworkSecurityPerimeterConfigurationResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + string perimeterGuid = "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter"; + string associationName = "someAssociation"; + ResourceIdentifier topicNetworkSecurityPerimeterConfigurationResourceId = TopicNetworkSecurityPerimeterConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName, perimeterGuid, associationName); + TopicNetworkSecurityPerimeterConfigurationResource topicNetworkSecurityPerimeterConfiguration = client.GetTopicNetworkSecurityPerimeterConfigurationResource(topicNetworkSecurityPerimeterConfigurationResourceId); + + // invoke the operation + TopicNetworkSecurityPerimeterConfigurationResource result = await topicNetworkSecurityPerimeterConfiguration.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Reconcile_NetworkSecurityPerimeterConfigurationsReconcile() + { + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/NetworkSecurityPerimeterConfigurations_Reconcile.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Reconcile" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TopicNetworkSecurityPerimeterConfigurationResource created on azure + // for more information of creating TopicNetworkSecurityPerimeterConfigurationResource, please refer to the document of TopicNetworkSecurityPerimeterConfigurationResource + string subscriptionId = "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; + string resourceGroupName = "examplerg"; + string resourceName = "exampleResourceName"; + string perimeterGuid = "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter"; + string associationName = "someAssociation"; + ResourceIdentifier topicNetworkSecurityPerimeterConfigurationResourceId = TopicNetworkSecurityPerimeterConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName, perimeterGuid, associationName); + TopicNetworkSecurityPerimeterConfigurationResource topicNetworkSecurityPerimeterConfiguration = client.GetTopicNetworkSecurityPerimeterConfigurationResource(topicNetworkSecurityPerimeterConfigurationResourceId); + + // invoke the operation + ArmOperation lro = await topicNetworkSecurityPerimeterConfiguration.ReconcileAsync(WaitUntil.Completed); + TopicNetworkSecurityPerimeterConfigurationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicSpaceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicSpaceCollection.cs index 6c5d25949cfd..66bb87c326bc 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicSpaceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicSpaceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_TopicSpaceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TopicSpacesCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicSpaces_CreateOrUpdate.json // this example is just showing the usage of "TopicSpaces_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_TopicSpacesCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_TopicSpacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicSpaces_Get.json // this example is just showing the usage of "TopicSpaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_TopicSpacesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TopicSpacesListByNamespace() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_ListByNamespace.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicSpaces_ListByNamespace.json // this example is just showing the usage of "TopicSpaces_ListByNamespace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetAll_TopicSpacesListByNamespace() [Ignore("Only validating compilation of examples")] public async Task Exists_TopicSpacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicSpaces_Get.json // this example is just showing the usage of "TopicSpaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -158,7 +158,7 @@ public async Task Exists_TopicSpacesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TopicSpacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicSpaces_Get.json // this example is just showing the usage of "TopicSpaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicSpaceResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicSpaceResource.cs index 569e186c32be..f6d0dc98caeb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicSpaceResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicSpaceResource.cs @@ -19,7 +19,7 @@ public partial class Sample_TopicSpaceResource [Ignore("Only validating compilation of examples")] public async Task Get_TopicSpacesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicSpaces_Get.json // this example is just showing the usage of "TopicSpaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_TopicSpacesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TopicSpacesDelete() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_Delete.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicSpaces_Delete.json // this example is just showing the usage of "TopicSpaces_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +77,7 @@ public async Task Delete_TopicSpacesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TopicSpacesCreateOrUpdate() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_CreateOrUpdate.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicSpaces_CreateOrUpdate.json // this example is just showing the usage of "TopicSpaces_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicTypeCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicTypeCollection.cs index 75df46234752..bd7475158722 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicTypeCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicTypeCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_TopicTypeCollection [Ignore("Only validating compilation of examples")] public async Task Get_TopicTypesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicTypes_Get.json // this example is just showing the usage of "TopicTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Get_TopicTypesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TopicTypesList() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_List.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicTypes_List.json // this example is just showing the usage of "TopicTypes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task GetAll_TopicTypesList() [Ignore("Only validating compilation of examples")] public async Task Exists_TopicTypesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicTypes_Get.json // this example is just showing the usage of "TopicTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Exists_TopicTypesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TopicTypesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicTypes_Get.json // this example is just showing the usage of "TopicTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicTypeResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicTypeResource.cs index d8177f7d3f6b..9d3038cab3cf 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicTypeResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_TopicTypeResource.cs @@ -20,7 +20,7 @@ public partial class Sample_TopicTypeResource [Ignore("Only validating compilation of examples")] public async Task Get_TopicTypesGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicTypes_Get.json // this example is just showing the usage of "TopicTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Get_TopicTypesGet() [Ignore("Only validating compilation of examples")] public async Task GetEventTypes_TopicTypesListEventTypes() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_ListEventTypes.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicTypes_ListEventTypes.json // this example is just showing the usage of "TopicTypes_ListEventTypes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_VerifiedPartnerCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_VerifiedPartnerCollection.cs index 4405aa5e9ad6..7918ab6fd305 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_VerifiedPartnerCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_VerifiedPartnerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VerifiedPartnerCollection [Ignore("Only validating compilation of examples")] public async Task Get_VerifiedPartnersGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/VerifiedPartners_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/VerifiedPartners_Get.json // this example is just showing the usage of "VerifiedPartners_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Get_VerifiedPartnersGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VerifiedPartnersList() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/VerifiedPartners_List.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/VerifiedPartners_List.json // this example is just showing the usage of "VerifiedPartners_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task GetAll_VerifiedPartnersList() [Ignore("Only validating compilation of examples")] public async Task Exists_VerifiedPartnersGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/VerifiedPartners_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/VerifiedPartners_Get.json // this example is just showing the usage of "VerifiedPartners_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Exists_VerifiedPartnersGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VerifiedPartnersGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/VerifiedPartners_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/VerifiedPartners_Get.json // this example is just showing the usage of "VerifiedPartners_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_VerifiedPartnerResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_VerifiedPartnerResource.cs index f0a4475d973b..9fd8c18279c5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_VerifiedPartnerResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_VerifiedPartnerResource.cs @@ -19,7 +19,7 @@ public partial class Sample_VerifiedPartnerResource [Ignore("Only validating compilation of examples")] public async Task Get_VerifiedPartnersGet() { - // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/VerifiedPartners_Get.json + // Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/VerifiedPartners_Get.json // this example is just showing the usage of "VerifiedPartners_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ArmEventGridModelFactory.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ArmEventGridModelFactory.cs index edea72d32ff8..ad1ca802f54c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ArmEventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ArmEventGridModelFactory.cs @@ -7,9 +7,11 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.EventGrid.Models { @@ -49,6 +51,11 @@ public static CaCertificateData CaCertificateData(ResourceIdentifier id = null, /// The systemData. /// The type of the event channel which represents the direction flow of events. /// 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 PartnerDestination and represents information about the partner destination resource corresponding to the channel. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// /// Context or helpful message that can be used during the approval process by the subscriber. /// Provisioning state of the channel. /// The readiness state of the corresponding partner topic. @@ -57,7 +64,7 @@ public static CaCertificateData CaCertificateData(ResourceIdentifier id = null, /// the channel and corresponding partner topic are deleted. /// /// A new instance for mocking. - public static PartnerNamespaceChannelData PartnerNamespaceChannelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PartnerNamespaceChannelType? channelType = null, PartnerTopicInfo partnerTopicInfo = null, string messageForActivation = null, PartnerNamespaceChannelProvisioningState? provisioningState = null, PartnerTopicReadinessState? readinessState = null, DateTimeOffset? expireOnIfNotActivated = null) + public static PartnerNamespaceChannelData PartnerNamespaceChannelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PartnerNamespaceChannelType? channelType = null, PartnerTopicInfo partnerTopicInfo = null, PartnerDestinationInfo partnerDestinationInfo = null, string messageForActivation = null, PartnerNamespaceChannelProvisioningState? provisioningState = null, PartnerTopicReadinessState? readinessState = null, DateTimeOffset? expireOnIfNotActivated = null) { return new PartnerNamespaceChannelData( id, @@ -66,6 +73,7 @@ public static PartnerNamespaceChannelData PartnerNamespaceChannelData(ResourceId systemData, channelType, partnerTopicInfo, + partnerDestinationInfo, messageForActivation, provisioningState, readinessState, @@ -147,6 +155,7 @@ public static EventGridNamespaceClientData EventGridNamespaceClientData(Resource /// The systemData. /// The tags. /// The location. + /// The Sku pricing tier for the Event Grid Domain resource. /// Identity information for the Event Grid Domain resource. /// List of private endpoint connections. /// Provisioning state of the Event Grid Domain Resource. @@ -168,7 +177,7 @@ public static EventGridNamespaceClientData EventGridNamespaceClientData(Resource /// You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.DomainProperties.InboundIpRules" /> /// /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. - /// 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 Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the domain. /// /// 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. @@ -189,7 +198,7 @@ public static EventGridNamespaceClientData EventGridNamespaceClientData(Resource /// /// Data Residency Boundary of the resource. /// A new instance for mocking. - public static EventGridDomainData EventGridDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, IEnumerable privateEndpointConnections = null, EventGridDomainProvisioningState? provisioningState = null, TlsVersion? minimumTlsVersionAllowed = null, Uri endpoint = null, EventGridInputSchema? inputSchema = null, PartnerTopicEventTypeInfo eventTypeInfo = null, EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, EventGridPublicNetworkAccess? publicNetworkAccess = null, IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = null, bool? autoCreateTopicWithFirstSubscription = null, bool? autoDeleteTopicWithLastSubscription = null, DataResidencyBoundary? dataResidencyBoundary = null) + public static EventGridDomainData EventGridDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EventGridSku? skuName = null, ManagedServiceIdentity identity = null, IEnumerable privateEndpointConnections = null, EventGridDomainProvisioningState? provisioningState = null, TlsVersion? minimumTlsVersionAllowed = null, Uri endpoint = null, EventGridInputSchema? inputSchema = null, PartnerTopicEventTypeInfo eventTypeInfo = null, EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, EventGridPublicNetworkAccess? publicNetworkAccess = null, IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = null, bool? autoCreateTopicWithFirstSubscription = null, bool? autoDeleteTopicWithLastSubscription = null, DataResidencyBoundary? dataResidencyBoundary = null) { tags ??= new Dictionary(); privateEndpointConnections ??= new List(); @@ -202,6 +211,7 @@ public static EventGridDomainData EventGridDomainData(ResourceIdentifier id = nu systemData, tags, location, + skuName != null ? new ResourceSku(skuName, serializedAdditionalRawData: null) : null, identity, privateEndpointConnections?.ToList(), provisioningState, @@ -283,9 +293,12 @@ public static DomainTopicData DomainTopicData(ResourceIdentifier id = null, stri /// The event delivery schema for the event subscription. /// Information about the filter for the event subscription. /// Expiration time of the event subscription. + /// Tags relating to Event Subscription resource. /// A new instance for mocking. - public static NamespaceTopicEventSubscriptionData NamespaceTopicEventSubscriptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SubscriptionProvisioningState? provisioningState = null, DeliveryConfiguration deliveryConfiguration = null, DeliverySchema? eventDeliverySchema = null, FiltersConfiguration filtersConfiguration = null, DateTimeOffset? expireOn = null) + public static NamespaceTopicEventSubscriptionData NamespaceTopicEventSubscriptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SubscriptionProvisioningState? provisioningState = null, DeliveryConfiguration deliveryConfiguration = null, DeliverySchema? eventDeliverySchema = null, FiltersConfiguration filtersConfiguration = null, DateTimeOffset? expireOn = null, IDictionary tags = null) { + tags ??= new Dictionary(); + return new NamespaceTopicEventSubscriptionData( id, name, @@ -296,6 +309,7 @@ public static NamespaceTopicEventSubscriptionData NamespaceTopicEventSubscriptio eventDeliverySchema, filtersConfiguration, expireOn, + tags, serializedAdditionalRawData: null); } @@ -310,7 +324,7 @@ public static NamespaceTopicEventSubscriptionData NamespaceTopicEventSubscriptio /// 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. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , and . /// /// /// Information about the destination where events have to be delivered for the event subscription. @@ -428,6 +442,7 @@ public static TopicsConfiguration TopicsConfiguration(string hostname = null, IE /// /// The endpoint for the topic spaces configuration. This is a read-only property. /// Routing enrichments for topic spaces configuration. + /// Client authentication settings for topic spaces configuration. /// /// 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. @@ -439,7 +454,7 @@ public static TopicsConfiguration TopicsConfiguration(string hostname = null, IE /// Routing identity info for topic spaces configuration. /// List of custom domain configurations for the namespace. /// A new instance for mocking. - public static TopicSpacesConfiguration TopicSpacesConfiguration(TopicSpacesConfigurationState? state = null, string routeTopicResourceId = null, string hostname = null, RoutingEnrichments routingEnrichments = null, int? maximumSessionExpiryInHours = null, int? maximumClientSessionsPerAuthenticationName = null, RoutingIdentityInfo routingIdentityInfo = null, IEnumerable customDomains = null) + public static TopicSpacesConfiguration TopicSpacesConfiguration(TopicSpacesConfigurationState? state = null, string routeTopicResourceId = null, string hostname = null, RoutingEnrichments routingEnrichments = null, ClientAuthenticationSettings clientAuthentication = null, int? maximumSessionExpiryInHours = null, int? maximumClientSessionsPerAuthenticationName = null, RoutingIdentityInfo routingIdentityInfo = null, IEnumerable customDomains = null) { customDomains ??= new List(); @@ -448,6 +463,7 @@ public static TopicSpacesConfiguration TopicSpacesConfiguration(TopicSpacesConfi routeTopicResourceId, hostname, routingEnrichments, + clientAuthentication, maximumSessionExpiryInHours, maximumClientSessionsPerAuthenticationName, routingIdentityInfo, @@ -500,89 +516,68 @@ public static TopicSharedAccessKeys TopicSharedAccessKeys(string key1 = null, st return new TopicSharedAccessKeys(key1, key2, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// Identity information for the resource. - /// List of private endpoint connections. - /// Provisioning state of the topic. - /// Endpoint for 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. - /// - /// Minimum TLS version of the publisher allowed to publish to this topic. - /// This determines the format that Event Grid should expect for incoming events published to the topic. - /// - /// 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. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - /// Metric resource id for the topic. - /// - /// 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.TopicProperties.InboundIpRules" /> - /// - /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. - /// 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. - /// Data Residency Boundary of the resource. - /// A new instance for mocking. - public static EventGridTopicData EventGridTopicData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, IEnumerable privateEndpointConnections = null, EventGridTopicProvisioningState? provisioningState = null, Uri endpoint = null, PartnerTopicEventTypeInfo eventTypeInfo = null, TlsVersion? minimumTlsVersionAllowed = null, EventGridInputSchema? inputSchema = null, EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, EventGridPublicNetworkAccess? publicNetworkAccess = null, IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = null, DataResidencyBoundary? dataResidencyBoundary = null) + /// The details of authorized partners. + /// Provisioning state of the partner configuration. + /// A new instance for mocking. + public static PartnerConfigurationData PartnerConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, PartnerAuthorization partnerAuthorization = null, PartnerConfigurationProvisioningState? provisioningState = null) { tags ??= new Dictionary(); - privateEndpointConnections ??= new List(); - inboundIPRules ??= new List(); - return new EventGridTopicData( + return new PartnerConfigurationData( id, name, resourceType, systemData, tags, location, - identity, - privateEndpointConnections?.ToList(), + partnerAuthorization, provisioningState, - endpoint, - eventTypeInfo, - minimumTlsVersionAllowed, - inputSchema, - inputSchemaMapping, - metricResourceId, - publicNetworkAccess, - inboundIPRules?.ToList(), - isLocalAuthDisabled, - dataResidencyBoundary, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// The details of authorized partners. - /// Provisioning state of the partner configuration. - /// A new instance for mocking. - public static PartnerConfigurationData PartnerConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, PartnerAuthorization partnerAuthorization = null, PartnerConfigurationProvisioningState? provisioningState = null) + /// The immutable Id of the corresponding partner registration. + /// Endpoint context associated with this partner destination. + /// + /// 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. + /// + /// Provisioning state of the partner destination. + /// Activation state of the partner destination. + /// Endpoint Base URL of the partner destination. + /// Context or helpful message that can be used during the approval process. + /// A new instance for mocking. + public static PartnerDestinationData PartnerDestinationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, Guid? partnerRegistrationImmutableId = null, string endpointServiceContext = null, DateTimeOffset? expirationTimeIfNotActivatedUtc = null, PartnerDestinationProvisioningState? provisioningState = null, PartnerDestinationActivationState? activationState = null, Uri endpointBaseUri = null, string messageForActivation = null) { tags ??= new Dictionary(); - return new PartnerConfigurationData( + return new PartnerDestinationData( id, name, resourceType, systemData, tags, location, - partnerAuthorization, + partnerRegistrationImmutableId, + endpointServiceContext, + expirationTimeIfNotActivatedUtc, provisioningState, + activationState, + endpointBaseUri, + messageForActivation, serializedAdditionalRawData: null); } @@ -606,7 +601,7 @@ public static PartnerConfigurationData PartnerConfigurationData(ResourceIdentifi /// You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceProperties.InboundIpRules" /> /// /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. - /// 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 Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the partner namespace. /// /// 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. @@ -721,6 +716,34 @@ public static PartnerTopicData PartnerTopicData(ResourceIdentifier id = null, st serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning state to reflect configuration state and indicate status of nsp profile configuration retrieval. + /// Provisioning issues to reflect status when attempting to retrieve nsp profile configuration. + /// Perimeter info for nsp association. + /// Nsp association name and access mode of association. + /// Nsp profile configuration, access rules and diagnostic settings. + /// A new instance for mocking. + public static NetworkSecurityPerimeterConfigurationData NetworkSecurityPerimeterConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NetworkSecurityPerimeterConfigProvisioningState? provisioningState = null, IEnumerable provisioningIssues = null, NetworkSecurityPerimeterInfo networkSecurityPerimeter = null, ResourceAssociation resourceAssociation = null, NetworkSecurityPerimeterConfigurationProfile profile = null) + { + provisioningIssues ??= new List(); + + return new NetworkSecurityPerimeterConfigurationData( + id, + name, + resourceType, + systemData, + provisioningState, + provisioningIssues?.ToList(), + networkSecurityPerimeter, + resourceAssociation, + profile, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -812,6 +835,72 @@ public static SystemTopicData SystemTopicData(ResourceIdentifier id = null, stri serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The Sku pricing tier for the topic. + /// Identity information for the resource. + /// Kind of the resource. + /// Extended location of the resource. + /// List of private endpoint connections. + /// Provisioning state of the topic. + /// Endpoint for 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. + /// + /// Minimum TLS version of the publisher allowed to publish to this topic. + /// This determines the format that Event Grid should expect for incoming events published to the topic. + /// + /// 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. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Metric resource id for the topic. + /// + /// 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.TopicProperties.InboundIpRules" /> + /// + /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. + /// This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the topic. + /// Data Residency Boundary of the resource. + /// A new instance for mocking. + public static EventGridTopicData EventGridTopicData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EventGridSku? skuName = null, ManagedServiceIdentity identity = null, ResourceKind? kind = null, ExtendedLocation extendedLocation = null, IEnumerable privateEndpointConnections = null, EventGridTopicProvisioningState? provisioningState = null, Uri endpoint = null, PartnerTopicEventTypeInfo eventTypeInfo = null, TlsVersion? minimumTlsVersionAllowed = null, EventGridInputSchema? inputSchema = null, EventGridInputSchemaMapping inputSchemaMapping = null, string metricResourceId = null, EventGridPublicNetworkAccess? publicNetworkAccess = null, IEnumerable inboundIPRules = null, bool? isLocalAuthDisabled = null, DataResidencyBoundary? dataResidencyBoundary = null) + { + tags ??= new Dictionary(); + privateEndpointConnections ??= new List(); + inboundIPRules ??= new List(); + + return new EventGridTopicData( + id, + name, + resourceType, + systemData, + tags, + location, + skuName != null ? new ResourceSku(skuName, serializedAdditionalRawData: null) : null, + identity, + kind, + extendedLocation, + privateEndpointConnections?.ToList(), + provisioningState, + endpoint, + eventTypeInfo, + minimumTlsVersionAllowed, + inputSchema, + inputSchemaMapping, + metricResourceId, + publicNetworkAccess, + inboundIPRules?.ToList(), + isLocalAuthDisabled, + dataResidencyBoundary, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -935,9 +1024,10 @@ public static TopicTypeData TopicTypeData(ResourceIdentifier id = null, string n /// Official name of the Partner. /// Display name of the verified partner. /// Details of the partner topic scenario. + /// Details of the partner destination scenario. /// Provisioning state of the verified partner. /// A new instance for mocking. - public static VerifiedPartnerData VerifiedPartnerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? partnerRegistrationImmutableId = null, string organizationName = null, string partnerDisplayName = null, PartnerDetails partnerTopicDetails = null, VerifiedPartnerProvisioningState? provisioningState = null) + public static VerifiedPartnerData VerifiedPartnerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? partnerRegistrationImmutableId = null, string organizationName = null, string partnerDisplayName = null, PartnerDetails partnerTopicDetails = null, PartnerDetails partnerDestinationDetails = null, VerifiedPartnerProvisioningState? provisioningState = null) { return new VerifiedPartnerData( id, @@ -948,6 +1038,7 @@ public static VerifiedPartnerData VerifiedPartnerData(ResourceIdentifier id = nu organizationName, partnerDisplayName, partnerTopicDetails, + partnerDestinationDetails, provisioningState, serializedAdditionalRawData: null); } @@ -977,8 +1068,8 @@ public static SubscriptionFullUri SubscriptionFullUri(Uri endpointUri = null) /// The base URL that represents the endpoint of the destination of an event subscription. /// Maximum number of events per batch. /// Preferred batch size in Kilobytes. - /// 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 Application ID or URI to get the access token that will be included as the bearer token in delivery requests. + /// The Microsoft Entra ID Tenant ID to get the access token that will be included as the bearer token in delivery requests. + /// The Microsoft Entra ID Application ID or URI to get the access token that will be included as the bearer token in delivery requests. /// /// Delivery attribute details. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -1002,5 +1093,178 @@ public static WebHookEventSubscriptionDestination WebHookEventSubscriptionDestin deliveryAttributeMappings?.ToList(), minimumTlsVersionAllowed); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The type of the event channel which represents the direction flow of events. + /// This property should be populated when channelType is PartnerTopic and represents information about the partner topic resource corresponding to the channel. + /// Context or helpful message that can be used during the approval process by the subscriber. + /// Provisioning state of the channel. + /// The readiness state of the corresponding partner topic. + /// + /// 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. + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static PartnerNamespaceChannelData PartnerNamespaceChannelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PartnerNamespaceChannelType? channelType, PartnerTopicInfo partnerTopicInfo, string messageForActivation, PartnerNamespaceChannelProvisioningState? provisioningState, PartnerTopicReadinessState? readinessState, DateTimeOffset? expireOnIfNotActivated) + { + return PartnerNamespaceChannelData(id: id, name: name, resourceType: resourceType, systemData: systemData, channelType: channelType, partnerTopicInfo: partnerTopicInfo, partnerDestinationInfo: default, messageForActivation: messageForActivation, provisioningState: provisioningState, readinessState: readinessState, expireOnIfNotActivated: expireOnIfNotActivated); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Identity information for the Event Grid Domain resource. + /// List of private endpoint connections. + /// Provisioning state of the Event Grid Domain Resource. + /// Minimum TLS version of the publisher allowed to publish to this domain. + /// Endpoint for the Event Grid Domain Resource which is used for publishing the events. + /// This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain Resource. + /// + /// 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. + /// + /// + /// Information about the InputSchemaMapping which specified the info about mapping event payload. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Metric resource id for the Event Grid Domain Resource. + /// + /// 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" /> + /// + /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. + /// 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 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. + /// + /// + /// 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. + /// + /// Data Residency Boundary of the resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static EventGridDomainData EventGridDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, IEnumerable privateEndpointConnections, EventGridDomainProvisioningState? provisioningState, TlsVersion? minimumTlsVersionAllowed, Uri endpoint, EventGridInputSchema? inputSchema, PartnerTopicEventTypeInfo eventTypeInfo, EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, EventGridPublicNetworkAccess? publicNetworkAccess, IEnumerable inboundIPRules, bool? isLocalAuthDisabled, bool? autoCreateTopicWithFirstSubscription, bool? autoDeleteTopicWithLastSubscription, DataResidencyBoundary? dataResidencyBoundary) + { + return EventGridDomainData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, skuName: default, identity: identity, privateEndpointConnections: privateEndpointConnections, provisioningState: provisioningState, minimumTlsVersionAllowed: minimumTlsVersionAllowed, endpoint: endpoint, inputSchema: inputSchema, eventTypeInfo: eventTypeInfo, inputSchemaMapping: inputSchemaMapping, metricResourceId: metricResourceId, publicNetworkAccess: publicNetworkAccess, inboundIPRules: inboundIPRules, isLocalAuthDisabled: isLocalAuthDisabled, autoCreateTopicWithFirstSubscription: autoCreateTopicWithFirstSubscription, autoDeleteTopicWithLastSubscription: autoDeleteTopicWithLastSubscription, dataResidencyBoundary: dataResidencyBoundary); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning state of the event subscription. + /// Information about the delivery configuration of the event subscription. + /// The event delivery schema for the event subscription. + /// Information about the filter for the event subscription. + /// Expiration time of the event subscription. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NamespaceTopicEventSubscriptionData NamespaceTopicEventSubscriptionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SubscriptionProvisioningState? provisioningState, DeliveryConfiguration deliveryConfiguration, DeliverySchema? eventDeliverySchema, FiltersConfiguration filtersConfiguration, DateTimeOffset? expireOn) + { + return NamespaceTopicEventSubscriptionData(id: id, name: name, resourceType: resourceType, systemData: systemData, provisioningState: provisioningState, deliveryConfiguration: deliveryConfiguration, eventDeliverySchema: eventDeliverySchema, filtersConfiguration: filtersConfiguration, expireOn: expireOn, tags: default); + } + + /// Initializes a new instance of . + /// Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled. + /// + /// 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. + /// + /// The endpoint for the topic spaces configuration. This is a read-only property. + /// Routing enrichments for topic spaces configuration. + /// + /// 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. + /// + /// + /// 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. + /// + /// Routing identity info for topic spaces configuration. + /// List of custom domain configurations for the namespace. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static TopicSpacesConfiguration TopicSpacesConfiguration(TopicSpacesConfigurationState? state, string routeTopicResourceId, string hostname, RoutingEnrichments routingEnrichments, int? maximumSessionExpiryInHours, int? maximumClientSessionsPerAuthenticationName, RoutingIdentityInfo routingIdentityInfo, IEnumerable customDomains) + { + return TopicSpacesConfiguration(state: state, routeTopicResourceId: routeTopicResourceId, hostname: hostname, routingEnrichments: routingEnrichments, clientAuthentication: default, maximumSessionExpiryInHours: maximumSessionExpiryInHours, maximumClientSessionsPerAuthenticationName: maximumClientSessionsPerAuthenticationName, routingIdentityInfo: routingIdentityInfo, customDomains: customDomains); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Identity information for the resource. + /// List of private endpoint connections. + /// Provisioning state of the topic. + /// Endpoint for 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. + /// + /// Minimum TLS version of the publisher allowed to publish to this topic. + /// This determines the format that Event Grid should expect for incoming events published to the topic. + /// + /// 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. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Metric resource id for the topic. + /// + /// 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.TopicProperties.InboundIpRules" /> + /// + /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. + /// 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. + /// Data Residency Boundary of the resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static EventGridTopicData EventGridTopicData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, IEnumerable privateEndpointConnections, EventGridTopicProvisioningState? provisioningState, Uri endpoint, PartnerTopicEventTypeInfo eventTypeInfo, TlsVersion? minimumTlsVersionAllowed, EventGridInputSchema? inputSchema, EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, EventGridPublicNetworkAccess? publicNetworkAccess, IEnumerable inboundIPRules, bool? isLocalAuthDisabled, DataResidencyBoundary? dataResidencyBoundary) + { + return EventGridTopicData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, skuName: default, identity: identity, kind: default, extendedLocation: default, privateEndpointConnections: privateEndpointConnections, provisioningState: provisioningState, endpoint: endpoint, eventTypeInfo: eventTypeInfo, minimumTlsVersionAllowed: minimumTlsVersionAllowed, inputSchema: inputSchema, inputSchemaMapping: inputSchemaMapping, metricResourceId: metricResourceId, publicNetworkAccess: publicNetworkAccess, inboundIPRules: inboundIPRules, isLocalAuthDisabled: isLocalAuthDisabled, dataResidencyBoundary: dataResidencyBoundary); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// ImmutableId of the corresponding partner registration. + /// Official name of the Partner. + /// Display name of the verified partner. + /// Details of the partner topic scenario. + /// Provisioning state of the verified partner. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static VerifiedPartnerData VerifiedPartnerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Guid? partnerRegistrationImmutableId, string organizationName, string partnerDisplayName, PartnerDetails partnerTopicDetails, VerifiedPartnerProvisioningState? provisioningState) + { + return VerifiedPartnerData(id: id, name: name, resourceType: resourceType, systemData: systemData, partnerRegistrationImmutableId: partnerRegistrationImmutableId, organizationName: organizationName, partnerDisplayName: partnerDisplayName, partnerTopicDetails: partnerTopicDetails, partnerDestinationDetails: default, provisioningState: provisioningState); + } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateCollection.cs index 979fcbf69327..c06dba02927a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string caCer /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string caCertificateName, Can /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string caCertificateName, /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string caCertificateName, CancellationToken /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateResource.cs index bb494c6f954c..6966cb8e1b9e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionCollection.cs index f78733963bd3..0d3c1df40b5d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string eventSubscri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string eventSubscriptionNa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string eventSubscriptionName, CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionResource.cs index e601c6f31105..56054db92cf6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -388,7 +388,7 @@ public virtual AsyncPageable GetDeliveryAttributesAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -417,7 +417,7 @@ public virtual Pageable GetDeliveryAttributes(Cancella /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetFullUriAsync(Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationCollection.cs new file mode 100644 index 000000000000..55159e8064d4 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationCollection.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.EventGrid.Models; + +namespace Azure.ResourceManager.EventGrid +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDomainNetworkSecurityPerimeterConfigurations method from an instance of . + /// + public partial class DomainNetworkSecurityPerimeterConfigurationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics; + private readonly NetworkSecurityPerimeterConfigurationsRestOperations _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient; + private readonly ClientDiagnostics _networkSecurityPerimeterConfigurationsClientDiagnostics; + private readonly NetworkSecurityPerimeterConfigurationsRestOperations _networkSecurityPerimeterConfigurationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DomainNetworkSecurityPerimeterConfigurationCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DomainNetworkSecurityPerimeterConfigurationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", DomainNetworkSecurityPerimeterConfigurationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DomainNetworkSecurityPerimeterConfigurationResource.ResourceType, out string domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsApiVersion); + _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient = new NetworkSecurityPerimeterConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsApiVersion); + _networkSecurityPerimeterConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _networkSecurityPerimeterConfigurationsRestClient = new NetworkSecurityPerimeterConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EventGridDomainResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EventGridDomainResource.ResourceType), nameof(id)); + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> GetAsync(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("DomainNetworkSecurityPerimeterConfigurationCollection.Get"); + scope.Start(); + try + { + var response = await _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, perimeterGuid, associationName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DomainNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response Get(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("DomainNetworkSecurityPerimeterConfigurationCollection.Get"); + scope.Start(); + try + { + var response = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, perimeterGuid, associationName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DomainNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get all network security perimeter configurations associated with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_List + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkSecurityPerimeterConfigurationsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(e), _networkSecurityPerimeterConfigurationsClientDiagnostics, Pipeline, "DomainNetworkSecurityPerimeterConfigurationCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Get all network security perimeter configurations associated with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_List + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkSecurityPerimeterConfigurationsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(e), _networkSecurityPerimeterConfigurationsClientDiagnostics, Pipeline, "DomainNetworkSecurityPerimeterConfigurationCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> ExistsAsync(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("DomainNetworkSecurityPerimeterConfigurationCollection.Exists"); + scope.Start(); + try + { + var response = await _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, perimeterGuid, associationName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response Exists(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("DomainNetworkSecurityPerimeterConfigurationCollection.Exists"); + scope.Start(); + try + { + var response = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, perimeterGuid, associationName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> GetIfExistsAsync(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("DomainNetworkSecurityPerimeterConfigurationCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, perimeterGuid, associationName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DomainNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual NullableResponse GetIfExists(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("DomainNetworkSecurityPerimeterConfigurationCollection.GetIfExists"); + scope.Start(); + try + { + var response = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, perimeterGuid, associationName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DomainNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationResource.Serialization.cs new file mode 100644 index 000000000000..d4077cda55d3 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.EventGrid +{ + public partial class DomainNetworkSecurityPerimeterConfigurationResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationResource.cs new file mode 100644 index 000000000000..8bf0bb5ae1d2 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainNetworkSecurityPerimeterConfigurationResource.cs @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.EventGrid.Models; + +namespace Azure.ResourceManager.EventGrid +{ + /// + /// A Class representing a DomainNetworkSecurityPerimeterConfiguration along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDomainNetworkSecurityPerimeterConfigurationResource method. + /// Otherwise you can get one from its parent resource using the GetDomainNetworkSecurityPerimeterConfiguration method. + /// + public partial class DomainNetworkSecurityPerimeterConfigurationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The resourceName. + /// The perimeterGuid. + /// The associationName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName, string perimeterGuid, string associationName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}/./{associationName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics; + private readonly NetworkSecurityPerimeterConfigurationsRestOperations _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient; + private readonly NetworkSecurityPerimeterConfigurationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.EventGrid/domains/networkSecurityPerimeterConfigurations/."; + + /// Initializes a new instance of the class for mocking. + protected DomainNetworkSecurityPerimeterConfigurationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DomainNetworkSecurityPerimeterConfigurationResource(ArmClient client, NetworkSecurityPerimeterConfigurationData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DomainNetworkSecurityPerimeterConfigurationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsApiVersion); + _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient = new NetworkSecurityPerimeterConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NetworkSecurityPerimeterConfigurationData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("DomainNetworkSecurityPerimeterConfigurationResource.Get"); + scope.Start(); + try + { + var response = await _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DomainNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("DomainNetworkSecurityPerimeterConfigurationResource.Get"); + scope.Start(); + try + { + var response = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DomainNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Reconcile a specific network security perimeter configuration for a given network security perimeter association with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName}/reconcile + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Reconcile + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ReconcileAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("DomainNetworkSecurityPerimeterConfigurationResource.Reconcile"); + scope.Start(); + try + { + var response = await _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.ReconcileAsync(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(new DomainNetworkSecurityPerimeterConfigurationOperationSource(Client), _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics, Pipeline, _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.CreateReconcileRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Reconcile a specific network security perimeter configuration for a given network security perimeter association with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName}/reconcile + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Reconcile + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Reconcile(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("DomainNetworkSecurityPerimeterConfigurationResource.Reconcile"); + scope.Start(); + try + { + var response = _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.Reconcile(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new EventGridArmOperation(new DomainNetworkSecurityPerimeterConfigurationOperationSource(Client), _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics, Pipeline, _domainNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.CreateReconcileRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicCollection.cs index e12c0fcc1569..1c1cb940a01d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -203,7 +203,7 @@ public virtual async Task> GetAsync(string domainT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual Response Get(string domainTopicName, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -280,7 +280,7 @@ public virtual AsyncPageable GetAllAsync(string filter = nu /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(string filter = null, int? t /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string domainTopicName, Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string domainTopicName, CancellationToken c /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionCollection.cs index ad304cedf8fb..a66f826ec15a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string eventSu /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(s /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(string filt /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string eventSubscriptionNa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string eventSubscriptionName, CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.cs index e6aae3210172..44a19914730e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -348,19 +348,19 @@ public virtual ArmOperation Update(WaitUnt } /// - /// Get the full endpoint URL for a nested event subscription for domain topic. + /// Get all delivery attributes for an event subscription for domain topic. /// /// /// Request Path - /// /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}/getDeliveryAttributes /// /// /// Operation Id - /// DomainTopicEventSubscriptions_GetFullUri + /// DomainTopicEventSubscriptions_GetDeliveryAttributes /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -369,36 +369,27 @@ public virtual ArmOperation Update(WaitUnt /// /// /// The cancellation token to use. - public virtual async Task> GetFullUriAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDeliveryAttributesAsync(CancellationToken cancellationToken = default) { - using var scope = _domainTopicEventSubscriptionClientDiagnostics.CreateScope("DomainTopicEventSubscriptionResource.GetFullUri"); - scope.Start(); - try - { - var response = await _domainTopicEventSubscriptionRestClient.GetFullUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _domainTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _domainTopicEventSubscriptionClientDiagnostics, Pipeline, "DomainTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); } /// - /// Get the full endpoint URL for a nested event subscription for domain topic. + /// Get all delivery attributes for an event subscription for domain topic. /// /// /// Request Path - /// /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}/getDeliveryAttributes /// /// /// Operation Id - /// DomainTopicEventSubscriptions_GetFullUri + /// DomainTopicEventSubscriptions_GetDeliveryAttributes /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -407,36 +398,27 @@ public virtual async Task> GetFullUriAsync(Ca /// /// /// The cancellation token to use. - public virtual Response GetFullUri(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDeliveryAttributes(CancellationToken cancellationToken = default) { - using var scope = _domainTopicEventSubscriptionClientDiagnostics.CreateScope("DomainTopicEventSubscriptionResource.GetFullUri"); - scope.Start(); - try - { - var response = _domainTopicEventSubscriptionRestClient.GetFullUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _domainTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _domainTopicEventSubscriptionClientDiagnostics, Pipeline, "DomainTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); } /// - /// Get all delivery attributes for an event subscription for domain topic. + /// Get the full endpoint URL for a nested event subscription for domain topic. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl /// /// /// Operation Id - /// DomainTopicEventSubscriptions_GetDeliveryAttributes + /// DomainTopicEventSubscriptions_GetFullUri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -445,27 +427,36 @@ public virtual Response GetFullUri(CancellationToken c /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDeliveryAttributesAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetFullUriAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _domainTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _domainTopicEventSubscriptionClientDiagnostics, Pipeline, "DomainTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); + using var scope = _domainTopicEventSubscriptionClientDiagnostics.CreateScope("DomainTopicEventSubscriptionResource.GetFullUri"); + scope.Start(); + try + { + var response = await _domainTopicEventSubscriptionRestClient.GetFullUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Get all delivery attributes for an event subscription for domain topic. + /// Get the full endpoint URL for a nested event subscription for domain topic. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl /// /// /// Operation Id - /// DomainTopicEventSubscriptions_GetDeliveryAttributes + /// DomainTopicEventSubscriptions_GetFullUri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -474,11 +465,20 @@ public virtual AsyncPageable GetDeliveryAttributesAsyn /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDeliveryAttributes(CancellationToken cancellationToken = default) + public virtual Response GetFullUri(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _domainTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _domainTopicEventSubscriptionClientDiagnostics, Pipeline, "DomainTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); + using var scope = _domainTopicEventSubscriptionClientDiagnostics.CreateScope("DomainTopicEventSubscriptionResource.GetFullUri"); + scope.Start(); + try + { + var response = _domainTopicEventSubscriptionRestClient.GetFullUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicResource.cs index 313ba8c0595e..a42ad53d2eee 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicResource.cs @@ -108,7 +108,7 @@ public virtual DomainTopicEventSubscriptionCollection GetDomainTopicEventSubscri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetDom /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetDomainTopicEven /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -376,7 +376,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainCollection.cs index 46f4f4ab10b4..68d479739f1d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string dom /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string domainName, Cancella /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(string filter = null, in /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string domainName, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string domainName, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs index c7ee7e0c19b7..e7fe89651d27 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs @@ -39,6 +39,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -149,6 +154,7 @@ internal static EventGridDomainData DeserializeEventGridDomainData(JsonElement e { return null; } + ResourceSku sku = default; ManagedServiceIdentity identity = default; IDictionary tags = default; AzureLocation location = default; @@ -174,6 +180,15 @@ internal static EventGridDomainData DeserializeEventGridDomainData(JsonElement e Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = ResourceSku.DeserializeResourceSku(property.Value, options); + continue; + } if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -383,6 +398,7 @@ internal static EventGridDomainData DeserializeEventGridDomainData(JsonElement e systemData, tags ?? new ChangeTrackingDictionary(), location, + sku, identity, privateEndpointConnections ?? new ChangeTrackingList(), provisioningState, @@ -484,6 +500,24 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SkuName", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine("{"); + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.cs index 66ee512ea80a..18bbdf3869b7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.cs @@ -66,6 +66,7 @@ public EventGridDomainData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. + /// The Sku pricing tier for the Event Grid Domain resource. /// Identity information for the Event Grid Domain resource. /// List of private endpoint connections. /// Provisioning state of the Event Grid Domain Resource. @@ -87,7 +88,7 @@ public EventGridDomainData(AzureLocation location) : base(location) /// You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.DomainProperties.InboundIpRules" /> /// /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. - /// 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 Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the domain. /// /// 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. @@ -108,8 +109,9 @@ public EventGridDomainData(AzureLocation location) : base(location) /// /// Data Residency Boundary of the resource. /// Keeps track of any properties unknown to the library. - internal EventGridDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, IReadOnlyList privateEndpointConnections, EventGridDomainProvisioningState? provisioningState, TlsVersion? minimumTlsVersionAllowed, Uri endpoint, EventGridInputSchema? inputSchema, PartnerTopicEventTypeInfo eventTypeInfo, EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, bool? isLocalAuthDisabled, bool? autoCreateTopicWithFirstSubscription, bool? autoDeleteTopicWithLastSubscription, DataResidencyBoundary? dataResidencyBoundary, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal EventGridDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceSku sku, ManagedServiceIdentity identity, IReadOnlyList privateEndpointConnections, EventGridDomainProvisioningState? provisioningState, TlsVersion? minimumTlsVersionAllowed, Uri endpoint, EventGridInputSchema? inputSchema, PartnerTopicEventTypeInfo eventTypeInfo, EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, bool? isLocalAuthDisabled, bool? autoCreateTopicWithFirstSubscription, bool? autoDeleteTopicWithLastSubscription, DataResidencyBoundary? dataResidencyBoundary, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { + Sku = sku; Identity = identity; PrivateEndpointConnections = privateEndpointConnections; ProvisioningState = provisioningState; @@ -133,6 +135,21 @@ internal EventGridDomainData() { } + /// The Sku pricing tier for the Event Grid Domain resource. + internal ResourceSku Sku { get; set; } + /// The Sku name of the resource. The possible values are: Basic or Premium. + [WirePath("sku.name")] + public EventGridSku? SkuName + { + get => Sku is null ? default : Sku.Name; + set + { + if (Sku is null) + Sku = new ResourceSku(); + Sku.Name = value; + } + } + /// Identity information for the Event Grid Domain resource. [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } @@ -176,7 +193,7 @@ internal EventGridDomainData() /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. [WirePath("properties.inboundIpRules")] public IList InboundIPRules { get; } - /// 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 Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the domain. [WirePath("properties.disableLocalAuth")] public bool? IsLocalAuthDisabled { get; set; } /// diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs index b43f449e778b..4e1bb24e3421 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(st /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs index a704156b6fae..fe946994b94c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.cs index 430af808a22c..a1e623267394 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs index 6f89e69bfe4d..886ecdb3e34e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string privateLi /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -219,7 +219,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -262,7 +262,7 @@ public virtual async Task> ExistsAsync(string privateLinkResource /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Response Exists(string privateLinkResourceName, Cancellatio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.cs index ab3f9dd1e863..28f5ceff5bfe 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.cs @@ -110,7 +110,7 @@ public virtual DomainTopicCollection GetDomainTopics() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetDomainTopicAsync(str /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual DomainEventSubscriptionCollection GetDomainEventSubscriptions() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetDomainEv /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -228,6 +228,77 @@ public virtual Response GetDomainEventSubscript return GetDomainEventSubscriptions().Get(eventSubscriptionName, cancellationToken); } + /// Gets a collection of DomainNetworkSecurityPerimeterConfigurationResources in the EventGridDomain. + /// An object representing collection of DomainNetworkSecurityPerimeterConfigurationResources and their operations over a DomainNetworkSecurityPerimeterConfigurationResource. + public virtual DomainNetworkSecurityPerimeterConfigurationCollection GetDomainNetworkSecurityPerimeterConfigurations() + { + return GetCachedClient(client => new DomainNetworkSecurityPerimeterConfigurationCollection(client, Id)); + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDomainNetworkSecurityPerimeterConfigurationAsync(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + return await GetDomainNetworkSecurityPerimeterConfigurations().GetAsync(perimeterGuid, associationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDomainNetworkSecurityPerimeterConfiguration(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + return GetDomainNetworkSecurityPerimeterConfigurations().Get(perimeterGuid, associationName, cancellationToken); + } + /// Gets a collection of EventGridDomainPrivateEndpointConnectionResources in the EventGridDomain. /// An object representing collection of EventGridDomainPrivateEndpointConnectionResources and their operations over a EventGridDomainPrivateEndpointConnectionResource. public virtual EventGridDomainPrivateEndpointConnectionCollection GetEventGridDomainPrivateEndpointConnections() @@ -248,7 +319,7 @@ public virtual EventGridDomainPrivateEndpointConnectionCollection GetEventGridDo /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -279,7 +350,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -317,7 +388,7 @@ public virtual EventGridDomainPrivateLinkResourceCollection GetEventGridDomainPr /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -348,7 +419,7 @@ public virtual async Task> GetEvent /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -379,7 +450,7 @@ public virtual Response GetEventGridDomainPr /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -419,7 +490,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -459,7 +530,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -501,7 +572,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -543,7 +614,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -589,7 +660,7 @@ public virtual async Task UpdateAsync(WaitUntil waitUntil, EventGr /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -635,7 +706,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, EventGridDomainPatch pat /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -673,7 +744,7 @@ public virtual async Task> GetSharedAc /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -711,7 +782,7 @@ public virtual Response GetSharedAccessKeys(Can /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -753,7 +824,7 @@ public virtual async Task> RegenerateK /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -795,7 +866,7 @@ public virtual Response RegenerateKey(EventGrid /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -857,7 +928,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -919,7 +990,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -976,7 +1047,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1033,7 +1104,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1093,7 +1164,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientCollection.cs index 7689f014c270..cd14ea27f152 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string clientName, /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(strin /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string clientName, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string clientName, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupCollection.cs index 4bf6b9ca5882..4c4bde066bf3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string client /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(string fil /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string clientGroupName, Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string clientGroupName, CancellationToken c /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupResource.cs index 1f48fdb8a5f1..a79dc0da6dce 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientResource.cs index dc20a71c1243..2d49da0b1820 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceCollection.cs index c94eeaa86b87..e827d2308058 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string namespaceName, Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string namespaceName, Canc /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string namespaceName, CancellationToken can /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingCollection.cs index 3b4e281277e2..4a109751dd88 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(stri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string permissionBindingNa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string permissionBindingName, CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingResource.cs index be86a7827f87..4069c717ae40 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceResource.cs index ad0c04c73b5a..d671e323c694 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceResource.cs @@ -110,7 +110,7 @@ public virtual CaCertificateCollection GetCaCertificates() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetCaCertificateAsync /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual EventGridNamespaceClientGroupCollection GetEventGridNamespaceClie /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetEv /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual EventGridNamespaceClientCollection GetEventGridNamespaceClients() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetEventGr /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual NamespaceTopicCollection GetNamespaceTopics() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -348,7 +348,7 @@ public virtual async Task> GetNamespaceTopicAsy /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -386,7 +386,7 @@ public virtual EventGridNamespacePermissionBindingCollection GetEventGridNamespa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -417,7 +417,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -455,7 +455,7 @@ public virtual TopicSpaceCollection GetTopicSpaces() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task> GetTopicSpaceAsync(strin /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -517,7 +517,7 @@ public virtual Response GetTopicSpace(string topicSpaceName, /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -557,7 +557,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -639,7 +639,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -681,7 +681,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -727,7 +727,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -773,7 +773,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -811,7 +811,7 @@ public virtual async Task> GetSharedAccessKe /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -849,7 +849,7 @@ public virtual Response GetSharedAccessKeys(Cancellat /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -895,7 +895,7 @@ public virtual async Task> RegenerateKey /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -941,7 +941,7 @@ public virtual ArmOperation RegenerateKey(WaitUntil w /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -983,7 +983,7 @@ public virtual async Task> V /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1025,7 +1025,7 @@ public virtual ArmOperation ValidateCusto /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1087,7 +1087,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1149,7 +1149,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1206,7 +1206,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1263,7 +1263,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1323,7 +1323,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs index 4cd9ba6f935d..29152b2baa98 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs index a4cc2fffa91a..99fe6fa21ece 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.cs index 335b999b3018..844ecb16564c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.cs @@ -68,7 +68,7 @@ public EventGridSubscriptionData() /// 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. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , and . /// /// /// Information about the destination where events have to be delivered for the event subscription. @@ -116,7 +116,7 @@ internal EventGridSubscriptionData(ResourceIdentifier id, string name, ResourceT /// 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. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , and . /// [WirePath("properties.destination")] public EventSubscriptionDestination Destination { get; set; } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicCollection.cs index b4c8816e009c..73e19e514b45 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string topi /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string topicName, Cancellati /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(string filter = null, int /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string topicName, Cancella /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string topicName, CancellationToken cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs index 8227e9605b40..7e42b3f14188 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs @@ -14,6 +14,7 @@ using Azure.Core; using Azure.ResourceManager.EventGrid.Models; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.EventGrid { @@ -39,11 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.Value.ToString()); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + JsonSerializer.Serialize(writer, ExtendedLocation); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) @@ -139,7 +155,10 @@ internal static EventGridTopicData DeserializeEventGridTopicData(JsonElement ele { return null; } + ResourceSku sku = default; ManagedServiceIdentity identity = default; + ResourceKind? kind = default; + ExtendedLocation extendedLocation = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -162,6 +181,15 @@ internal static EventGridTopicData DeserializeEventGridTopicData(JsonElement ele Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = ResourceSku.DeserializeResourceSku(property.Value, options); + continue; + } if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -171,6 +199,24 @@ internal static EventGridTopicData DeserializeEventGridTopicData(JsonElement ele identity = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } + if (property.NameEquals("kind"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kind = new ResourceKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -353,7 +399,10 @@ internal static EventGridTopicData DeserializeEventGridTopicData(JsonElement ele systemData, tags ?? new ChangeTrackingDictionary(), location, + sku, identity, + kind, + extendedLocation, privateEndpointConnections ?? new ChangeTrackingList(), provisioningState, endpoint, @@ -452,6 +501,24 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SkuName", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine("{"); + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); if (hasPropertyOverride) { @@ -467,6 +534,36 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + builder.AppendLine($"'{Kind.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExtendedLocation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" extendedLocation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExtendedLocation)) + { + builder.Append(" extendedLocation: "); + BicepSerializationHelpers.AppendChildObject(builder, ExtendedLocation, options, 2, false, " extendedLocation: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.cs index 143d3eff100e..47bd39fe798f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.cs @@ -10,6 +10,7 @@ using Azure.Core; using Azure.ResourceManager.EventGrid.Models; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.EventGrid { @@ -66,7 +67,10 @@ public EventGridTopicData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. + /// The Sku pricing tier for the topic. /// Identity information for the resource. + /// Kind of the resource. + /// Extended location of the resource. /// List of private endpoint connections. /// Provisioning state of the topic. /// Endpoint for the topic. @@ -87,12 +91,15 @@ public EventGridTopicData(AzureLocation location) : base(location) /// You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicProperties.InboundIpRules" /> /// /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. - /// 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 Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the topic. /// Data Residency Boundary of the resource. /// Keeps track of any properties unknown to the library. - internal EventGridTopicData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, IReadOnlyList privateEndpointConnections, EventGridTopicProvisioningState? provisioningState, Uri endpoint, PartnerTopicEventTypeInfo eventTypeInfo, TlsVersion? minimumTlsVersionAllowed, EventGridInputSchema? inputSchema, EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, bool? isLocalAuthDisabled, DataResidencyBoundary? dataResidencyBoundary, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal EventGridTopicData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceSku sku, ManagedServiceIdentity identity, ResourceKind? kind, ExtendedLocation extendedLocation, IReadOnlyList privateEndpointConnections, EventGridTopicProvisioningState? provisioningState, Uri endpoint, PartnerTopicEventTypeInfo eventTypeInfo, TlsVersion? minimumTlsVersionAllowed, EventGridInputSchema? inputSchema, EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, bool? isLocalAuthDisabled, DataResidencyBoundary? dataResidencyBoundary, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { + Sku = sku; Identity = identity; + Kind = kind; + ExtendedLocation = extendedLocation; PrivateEndpointConnections = privateEndpointConnections; ProvisioningState = provisioningState; Endpoint = endpoint; @@ -113,9 +120,30 @@ internal EventGridTopicData() { } + /// The Sku pricing tier for the topic. + internal ResourceSku Sku { get; set; } + /// The Sku name of the resource. The possible values are: Basic or Premium. + [WirePath("sku.name")] + public EventGridSku? SkuName + { + get => Sku is null ? default : Sku.Name; + set + { + if (Sku is null) + Sku = new ResourceSku(); + Sku.Name = value; + } + } + /// Identity information for the resource. [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } + /// Kind of the resource. + [WirePath("kind")] + public ResourceKind? Kind { get; set; } + /// Extended location of the resource. + [WirePath("extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } /// List of private endpoint connections. [WirePath("properties.privateEndpointConnections")] public IReadOnlyList PrivateEndpointConnections { get; } @@ -156,7 +184,7 @@ internal EventGridTopicData() /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. [WirePath("properties.inboundIpRules")] public IList InboundIPRules { get; } - /// 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 Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the topic. [WirePath("properties.disableLocalAuth")] public bool? IsLocalAuthDisabled { get; set; } /// Data Residency Boundary of the resource. diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs index c6ce1b27bf84..36f7cf583019 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Cre /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(str /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable Ge /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll( /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs index 1a7d3818bb5a..b9b22c16d934 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Can /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.cs index a5b03b1154a5..23dd32b7c286 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs index 4dfef09cdb23..5a8d27a91bb2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string privateLin /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync(stri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -219,7 +219,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -262,7 +262,7 @@ public virtual async Task> ExistsAsync(string privateLinkResource /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Response Exists(string privateLinkResourceName, Cancellatio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.cs index 7d216fe9a91f..0e03e87da11c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.cs @@ -110,7 +110,7 @@ public virtual TopicEventSubscriptionCollection GetTopicEventSubscriptions() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetTopicEven /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -159,6 +159,77 @@ public virtual Response GetTopicEventSubscriptio return GetTopicEventSubscriptions().Get(eventSubscriptionName, cancellationToken); } + /// Gets a collection of TopicNetworkSecurityPerimeterConfigurationResources in the EventGridTopic. + /// An object representing collection of TopicNetworkSecurityPerimeterConfigurationResources and their operations over a TopicNetworkSecurityPerimeterConfigurationResource. + public virtual TopicNetworkSecurityPerimeterConfigurationCollection GetTopicNetworkSecurityPerimeterConfigurations() + { + return GetCachedClient(client => new TopicNetworkSecurityPerimeterConfigurationCollection(client, Id)); + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetTopicNetworkSecurityPerimeterConfigurationAsync(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + return await GetTopicNetworkSecurityPerimeterConfigurations().GetAsync(perimeterGuid, associationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetTopicNetworkSecurityPerimeterConfiguration(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + return GetTopicNetworkSecurityPerimeterConfigurations().Get(perimeterGuid, associationName, cancellationToken); + } + /// Gets a collection of EventGridTopicPrivateEndpointConnectionResources in the EventGridTopic. /// An object representing collection of EventGridTopicPrivateEndpointConnectionResources and their operations over a EventGridTopicPrivateEndpointConnectionResource. public virtual EventGridTopicPrivateEndpointConnectionCollection GetEventGridTopicPrivateEndpointConnections() @@ -179,7 +250,7 @@ public virtual EventGridTopicPrivateEndpointConnectionCollection GetEventGridTop /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -210,7 +281,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -248,7 +319,7 @@ public virtual EventGridTopicPrivateLinkResourceCollection GetEventGridTopicPriv /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -279,7 +350,7 @@ public virtual async Task> GetEventG /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -310,7 +381,7 @@ public virtual Response GetEventGridTopicPriv /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -350,7 +421,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -390,7 +461,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -432,7 +503,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -474,7 +545,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -520,7 +591,7 @@ public virtual async Task UpdateAsync(WaitUntil waitUntil, EventGr /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -566,7 +637,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, EventGridTopicPatch patc /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -604,7 +675,7 @@ public virtual async Task> GetSharedAccessKeysAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -642,7 +713,7 @@ public virtual Response GetSharedAccessKeys(CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -688,7 +759,7 @@ public virtual async Task> RegenerateKeyAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -734,7 +805,7 @@ public virtual ArmOperation RegenerateKey(WaitUntil waitU /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -796,7 +867,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -858,7 +929,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -915,7 +986,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -972,7 +1043,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1032,7 +1103,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionCollection.cs index 75b0ce1ee8bd..eb9f53c193cb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionCollection.cs @@ -56,7 +56,7 @@ internal EventSubscriptionCollection(ArmClient client, ResourceIdentifier id) : /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -105,7 +105,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -199,7 +199,7 @@ public virtual async Task> GetAsync(string e /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -244,7 +244,7 @@ public virtual Response Get(string eventSubscriptionN /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -260,7 +260,7 @@ public virtual Response Get(string eventSubscriptionN /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -276,7 +276,7 @@ public virtual Response Get(string eventSubscriptionN /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -292,7 +292,7 @@ public virtual Response Get(string eventSubscriptionN /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -377,7 +377,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -393,7 +393,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -446,7 +446,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -489,7 +489,7 @@ public virtual async Task> ExistsAsync(string eventSubscriptionNa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -532,7 +532,7 @@ public virtual Response Exists(string eventSubscriptionName, CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -577,7 +577,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.cs index bc0dd5a16145..936f36f7ef1d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -345,19 +345,19 @@ public virtual ArmOperation Update(WaitUntil waitUnti } /// - /// Get the full endpoint URL for an event subscription. + /// Get all delivery attributes for an event subscription. /// /// /// Request Path - /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl + /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes /// /// /// Operation Id - /// EventSubscriptions_GetFullUri + /// EventSubscriptions_GetDeliveryAttributes /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -366,36 +366,27 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// The cancellation token to use. - public virtual async Task> GetFullUriAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDeliveryAttributesAsync(CancellationToken cancellationToken = default) { - using var scope = _eventSubscriptionClientDiagnostics.CreateScope("EventSubscriptionResource.GetFullUri"); - scope.Start(); - try - { - var response = await _eventSubscriptionRestClient.GetFullUriAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.Parent, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _eventSubscriptionClientDiagnostics, Pipeline, "EventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); } /// - /// Get the full endpoint URL for an event subscription. + /// Get all delivery attributes for an event subscription. /// /// /// Request Path - /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl + /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes /// /// /// Operation Id - /// EventSubscriptions_GetFullUri + /// EventSubscriptions_GetDeliveryAttributes /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -404,36 +395,27 @@ public virtual async Task> GetFullUriAsync(Ca /// /// /// The cancellation token to use. - public virtual Response GetFullUri(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDeliveryAttributes(CancellationToken cancellationToken = default) { - using var scope = _eventSubscriptionClientDiagnostics.CreateScope("EventSubscriptionResource.GetFullUri"); - scope.Start(); - try - { - var response = _eventSubscriptionRestClient.GetFullUri(Id.Parent, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.Parent, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _eventSubscriptionClientDiagnostics, Pipeline, "EventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); } /// - /// Get all delivery attributes for an event subscription. + /// Get the full endpoint URL for an event subscription. /// /// /// Request Path - /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes + /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl /// /// /// Operation Id - /// EventSubscriptions_GetDeliveryAttributes + /// EventSubscriptions_GetFullUri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -442,27 +424,36 @@ public virtual Response GetFullUri(CancellationToken c /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDeliveryAttributesAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetFullUriAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.Parent, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _eventSubscriptionClientDiagnostics, Pipeline, "EventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); + using var scope = _eventSubscriptionClientDiagnostics.CreateScope("EventSubscriptionResource.GetFullUri"); + scope.Start(); + try + { + var response = await _eventSubscriptionRestClient.GetFullUriAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Get all delivery attributes for an event subscription. + /// Get the full endpoint URL for an event subscription. /// /// /// Request Path - /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes + /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl /// /// /// Operation Id - /// EventSubscriptions_GetDeliveryAttributes + /// EventSubscriptions_GetFullUri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -471,11 +462,20 @@ public virtual AsyncPageable GetDeliveryAttributesAsyn /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDeliveryAttributes(CancellationToken cancellationToken = default) + public virtual Response GetFullUri(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.Parent, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _eventSubscriptionClientDiagnostics, Pipeline, "EventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); + using var scope = _eventSubscriptionClientDiagnostics.CreateScope("EventSubscriptionResource.GetFullUri"); + scope.Start(); + try + { + var response = _eventSubscriptionRestClient.GetFullUri(Id.Parent, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicResource.cs index de643b868470..1c9221effbe1 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicResource.cs @@ -98,7 +98,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -138,7 +138,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/EventGridExtensions.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/EventGridExtensions.cs index b67277989320..aafc08a82249 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/EventGridExtensions.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/EventGridExtensions.cs @@ -69,7 +69,7 @@ public static EventSubscriptionCollection GetEventSubscriptions(this ArmClient c /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -108,7 +108,7 @@ public static async Task> GetEventSubscripti /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -266,6 +266,25 @@ public static DomainTopicResource GetDomainTopicResource(this ArmClient client, return GetMockableEventGridArmClient(client).GetDomainTopicResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DomainTopicEventSubscriptionResource GetDomainTopicEventSubscriptionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableEventGridArmClient(client).GetDomainTopicEventSubscriptionResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -323,25 +342,6 @@ public static EventSubscriptionResource GetEventSubscriptionResource(this ArmCli return GetMockableEventGridArmClient(client).GetEventSubscriptionResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static DomainTopicEventSubscriptionResource GetDomainTopicEventSubscriptionResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableEventGridArmClient(client).GetDomainTopicEventSubscriptionResource(id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -438,41 +438,41 @@ public static NamespaceTopicResource GetNamespaceTopicResource(this ArmClient cl } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static EventGridTopicResource GetEventGridTopicResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static PartnerConfigurationResource GetPartnerConfigurationResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableEventGridArmClient(client).GetEventGridTopicResource(id); + return GetMockableEventGridArmClient(client).GetPartnerConfigurationResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static PartnerConfigurationResource GetPartnerConfigurationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static PartnerDestinationResource GetPartnerDestinationResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableEventGridArmClient(client).GetPartnerConfigurationResource(id); + return GetMockableEventGridArmClient(client).GetPartnerDestinationResource(id); } /// @@ -532,6 +532,44 @@ public static PartnerTopicResource GetPartnerTopicResource(this ArmClient client return GetMockableEventGridArmClient(client).GetPartnerTopicResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static TopicNetworkSecurityPerimeterConfigurationResource GetTopicNetworkSecurityPerimeterConfigurationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableEventGridArmClient(client).GetTopicNetworkSecurityPerimeterConfigurationResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DomainNetworkSecurityPerimeterConfigurationResource GetDomainNetworkSecurityPerimeterConfigurationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableEventGridArmClient(client).GetDomainNetworkSecurityPerimeterConfigurationResource(id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -684,6 +722,25 @@ public static SystemTopicResource GetSystemTopicResource(this ArmClient client, return GetMockableEventGridArmClient(client).GetSystemTopicResource(id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static EventGridTopicResource GetEventGridTopicResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableEventGridArmClient(client).GetEventGridTopicResource(id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -790,7 +847,7 @@ public static EventGridDomainCollection GetEventGridDomains(this ResourceGroupRe /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -828,7 +885,7 @@ public static async Task> GetEventGridDomainAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -883,7 +940,7 @@ public static EventGridNamespaceCollection GetEventGridNamespaces(this ResourceG /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -921,7 +978,7 @@ public static async Task> GetEventGridNames /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -947,113 +1004,113 @@ public static Response GetEventGridNamespace(this Re } /// - /// Gets a collection of EventGridTopicResources in the ResourceGroupResource. + /// Gets an object representing a PartnerConfigurationResource along with the instance operations that can be performed on it in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// is null. - /// An object representing collection of EventGridTopicResources and their operations over a EventGridTopicResource. - public static EventGridTopicCollection GetEventGridTopics(this ResourceGroupResource resourceGroupResource) + /// Returns a object. + public static PartnerConfigurationResource GetPartnerConfiguration(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableEventGridResourceGroupResource(resourceGroupResource).GetEventGridTopics(); + return GetMockableEventGridResourceGroupResource(resourceGroupResource).GetPartnerConfiguration(); } /// - /// Get properties of a topic. + /// Gets a collection of PartnerDestinationResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of PartnerDestinationResources and their operations over a PartnerDestinationResource. + public static PartnerDestinationCollection GetPartnerDestinations(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableEventGridResourceGroupResource(resourceGroupResource).GetPartnerDestinations(); + } + + /// + /// Get properties of a partner destination. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} /// /// /// Operation Id - /// Topics_Get + /// PartnerDestinations_Get /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// Name of the topic. + /// Name of the partner destination. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetEventGridTopicAsync(this ResourceGroupResource resourceGroupResource, string topicName, CancellationToken cancellationToken = default) + public static async Task> GetPartnerDestinationAsync(this ResourceGroupResource resourceGroupResource, string partnerDestinationName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableEventGridResourceGroupResource(resourceGroupResource).GetEventGridTopicAsync(topicName, cancellationToken).ConfigureAwait(false); + return await GetMockableEventGridResourceGroupResource(resourceGroupResource).GetPartnerDestinationAsync(partnerDestinationName, cancellationToken).ConfigureAwait(false); } /// - /// Get properties of a topic. + /// Get properties of a partner destination. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} /// /// /// Operation Id - /// Topics_Get + /// PartnerDestinations_Get /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// Name of the topic. + /// Name of the partner destination. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetEventGridTopic(this ResourceGroupResource resourceGroupResource, string topicName, CancellationToken cancellationToken = default) + public static Response GetPartnerDestination(this ResourceGroupResource resourceGroupResource, string partnerDestinationName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableEventGridResourceGroupResource(resourceGroupResource).GetEventGridTopic(topicName, cancellationToken); - } - - /// - /// Gets an object representing a PartnerConfigurationResource along with the instance operations that can be performed on it in the ResourceGroupResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// is null. - /// Returns a object. - public static PartnerConfigurationResource GetPartnerConfiguration(this ResourceGroupResource resourceGroupResource) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableEventGridResourceGroupResource(resourceGroupResource).GetPartnerConfiguration(); + return GetMockableEventGridResourceGroupResource(resourceGroupResource).GetPartnerDestination(partnerDestinationName, cancellationToken); } /// @@ -1086,7 +1143,7 @@ public static PartnerNamespaceCollection GetPartnerNamespaces(this ResourceGroup /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1124,7 +1181,7 @@ public static async Task> GetPartnerNamespace /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1179,7 +1236,7 @@ public static PartnerRegistrationCollection GetPartnerRegistrations(this Resourc /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1217,7 +1274,7 @@ public static async Task> GetPartnerRegist /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1272,7 +1329,7 @@ public static PartnerTopicCollection GetPartnerTopics(this ResourceGroupResource /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1310,7 +1367,7 @@ public static async Task> GetPartnerTopicAsync(th /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1365,7 +1422,7 @@ public static SystemTopicCollection GetSystemTopics(this ResourceGroupResource r /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1403,7 +1460,7 @@ public static async Task> GetSystemTopicAsync(this /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1428,6 +1485,99 @@ public static Response GetSystemTopic(this ResourceGroupRes return GetMockableEventGridResourceGroupResource(resourceGroupResource).GetSystemTopic(systemTopicName, cancellationToken); } + /// + /// Gets a collection of EventGridTopicResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of EventGridTopicResources and their operations over a EventGridTopicResource. + public static EventGridTopicCollection GetEventGridTopics(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableEventGridResourceGroupResource(resourceGroupResource).GetEventGridTopics(); + } + + /// + /// Get properties of a topic. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the topic. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEventGridTopicAsync(this ResourceGroupResource resourceGroupResource, string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableEventGridResourceGroupResource(resourceGroupResource).GetEventGridTopicAsync(topicName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get properties of a topic. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the topic. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEventGridTopic(this ResourceGroupResource resourceGroupResource, string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableEventGridResourceGroupResource(resourceGroupResource).GetEventGridTopic(topicName, cancellationToken); + } + /// /// List all the domains under an Azure subscription. /// @@ -1441,7 +1591,7 @@ public static Response GetSystemTopic(this ResourceGroupRes /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1479,7 +1629,7 @@ public static AsyncPageable GetEventGridDomainsAsync(th /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1517,7 +1667,7 @@ public static Pageable GetEventGridDomains(this Subscri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1555,7 +1705,7 @@ public static AsyncPageable GetEventGridNamespacesAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1581,28 +1731,28 @@ public static Pageable GetEventGridNamespaces(this S } /// - /// List all the topics under an Azure subscription. + /// List all the partner configurations under an Azure subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerConfigurations /// /// /// Operation Id - /// Topics_ListBySubscription + /// PartnerConfigurations_ListBySubscription /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -1610,37 +1760,37 @@ public static Pageable GetEventGridNamespaces(this S /// 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. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetEventGridTopicsAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetPartnerConfigurationsAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEventGridSubscriptionResource(subscriptionResource).GetEventGridTopicsAsync(filter, top, cancellationToken); + return GetMockableEventGridSubscriptionResource(subscriptionResource).GetPartnerConfigurationsAsync(filter, top, cancellationToken); } /// - /// List all the topics under an Azure subscription. + /// List all the partner configurations under an Azure subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerConfigurations /// /// /// Operation Id - /// Topics_ListBySubscription + /// PartnerConfigurations_ListBySubscription /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -1648,37 +1798,37 @@ public static AsyncPageable GetEventGridTopicsAsync(this /// 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. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetEventGridTopics(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetPartnerConfigurations(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEventGridSubscriptionResource(subscriptionResource).GetEventGridTopics(filter, top, cancellationToken); + return GetMockableEventGridSubscriptionResource(subscriptionResource).GetPartnerConfigurations(filter, top, cancellationToken); } /// - /// List all the partner configurations under an Azure subscription. + /// List all the partner destinations under an Azure subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerConfigurations + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations /// /// /// Operation Id - /// PartnerConfigurations_ListBySubscription + /// PartnerDestinations_ListBySubscription /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -1686,37 +1836,37 @@ public static Pageable GetEventGridTopics(this Subscript /// 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. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetPartnerConfigurationsAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetPartnerDestinationsAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEventGridSubscriptionResource(subscriptionResource).GetPartnerConfigurationsAsync(filter, top, cancellationToken); + return GetMockableEventGridSubscriptionResource(subscriptionResource).GetPartnerDestinationsAsync(filter, top, cancellationToken); } /// - /// List all the partner configurations under an Azure subscription. + /// List all the partner destinations under an Azure subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerConfigurations + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations /// /// /// Operation Id - /// PartnerConfigurations_ListBySubscription + /// PartnerDestinations_ListBySubscription /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -1724,12 +1874,12 @@ public static AsyncPageable GetPartnerConfiguratio /// 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. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetPartnerConfigurations(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetPartnerDestinations(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEventGridSubscriptionResource(subscriptionResource).GetPartnerConfigurations(filter, top, cancellationToken); + return GetMockableEventGridSubscriptionResource(subscriptionResource).GetPartnerDestinations(filter, top, cancellationToken); } /// @@ -1745,7 +1895,7 @@ public static Pageable GetPartnerConfigurations(th /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1783,7 +1933,7 @@ public static AsyncPageable GetPartnerNamespacesAsync( /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1821,7 +1971,7 @@ public static Pageable GetPartnerNamespaces(this Subsc /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1859,7 +2009,7 @@ public static AsyncPageable GetPartnerRegistrations /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1897,7 +2047,7 @@ public static Pageable GetPartnerRegistrations(this /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1935,7 +2085,7 @@ public static AsyncPageable GetPartnerTopicsAsync(this Sub /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1973,7 +2123,7 @@ public static Pageable GetPartnerTopics(this SubscriptionR /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -2011,7 +2161,7 @@ public static AsyncPageable GetSystemTopicsAsync(this Subsc /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -2036,6 +2186,82 @@ public static Pageable GetSystemTopics(this SubscriptionRes return GetMockableEventGridSubscriptionResource(subscriptionResource).GetSystemTopics(filter, top, cancellationToken); } + /// + /// List all the topics under an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics + /// + /// + /// Operation Id + /// Topics_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// 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'. + /// 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. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetEventGridTopicsAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableEventGridSubscriptionResource(subscriptionResource).GetEventGridTopicsAsync(filter, top, cancellationToken); + } + + /// + /// List all the topics under an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics + /// + /// + /// Operation Id + /// Topics_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// 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'. + /// 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. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetEventGridTopics(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableEventGridSubscriptionResource(subscriptionResource).GetEventGridTopics(filter, top, cancellationToken); + } + /// /// Gets a collection of TopicTypeResources in the TenantResource. /// @@ -2066,7 +2292,7 @@ public static TopicTypeCollection GetTopicTypes(this TenantResource tenantResour /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -2104,7 +2330,7 @@ public static async Task> GetTopicTypeAsync(this Ten /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -2159,7 +2385,7 @@ public static VerifiedPartnerCollection GetVerifiedPartners(this TenantResource /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -2197,7 +2423,7 @@ public static async Task> GetVerifiedPartnerAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridArmClient.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridArmClient.cs index 3193641935f0..1b0af63cd972 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridArmClient.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridArmClient.cs @@ -58,7 +58,7 @@ public virtual EventSubscriptionCollection GetEventSubscriptions(ResourceIdentif /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -90,7 +90,7 @@ public virtual async Task> GetEventSubscript /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -189,6 +189,18 @@ public virtual DomainTopicResource GetDomainTopicResource(ResourceIdentifier id) return new DomainTopicResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DomainTopicEventSubscriptionResource GetDomainTopicEventSubscriptionResource(ResourceIdentifier id) + { + DomainTopicEventSubscriptionResource.ValidateResourceId(id); + return new DomainTopicEventSubscriptionResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -225,18 +237,6 @@ public virtual EventSubscriptionResource GetEventSubscriptionResource(ResourceId return new EventSubscriptionResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual DomainTopicEventSubscriptionResource GetDomainTopicEventSubscriptionResource(ResourceIdentifier id) - { - DomainTopicEventSubscriptionResource.ValidateResourceId(id); - return new DomainTopicEventSubscriptionResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -297,18 +297,6 @@ public virtual NamespaceTopicResource GetNamespaceTopicResource(ResourceIdentifi return new NamespaceTopicResource(Client, id); } - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual EventGridTopicResource GetEventGridTopicResource(ResourceIdentifier id) - { - EventGridTopicResource.ValidateResourceId(id); - return new EventGridTopicResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -321,6 +309,18 @@ public virtual PartnerConfigurationResource GetPartnerConfigurationResource(Reso return new PartnerConfigurationResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual PartnerDestinationResource GetPartnerDestinationResource(ResourceIdentifier id) + { + PartnerDestinationResource.ValidateResourceId(id); + return new PartnerDestinationResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -357,6 +357,30 @@ public virtual PartnerTopicResource GetPartnerTopicResource(ResourceIdentifier i return new PartnerTopicResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual TopicNetworkSecurityPerimeterConfigurationResource GetTopicNetworkSecurityPerimeterConfigurationResource(ResourceIdentifier id) + { + TopicNetworkSecurityPerimeterConfigurationResource.ValidateResourceId(id); + return new TopicNetworkSecurityPerimeterConfigurationResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DomainNetworkSecurityPerimeterConfigurationResource GetDomainNetworkSecurityPerimeterConfigurationResource(ResourceIdentifier id) + { + DomainNetworkSecurityPerimeterConfigurationResource.ValidateResourceId(id); + return new DomainNetworkSecurityPerimeterConfigurationResource(Client, id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -453,6 +477,18 @@ public virtual SystemTopicResource GetSystemTopicResource(ResourceIdentifier id) return new SystemTopicResource(Client, id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual EventGridTopicResource GetEventGridTopicResource(ResourceIdentifier id) + { + EventGridTopicResource.ValidateResourceId(id); + return new EventGridTopicResource(Client, id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridResourceGroupResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridResourceGroupResource.cs index 4da177f468e9..60b97b66e2e9 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridResourceGroupResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridResourceGroupResource.cs @@ -66,7 +66,7 @@ public virtual EventGridDomainCollection GetEventGridDomains() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -97,7 +97,7 @@ public virtual async Task> GetEventGridDomainA /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -135,7 +135,7 @@ public virtual EventGridNamespaceCollection GetEventGridNamespaces() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual async Task> GetEventGridName /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -184,80 +184,80 @@ public virtual Response GetEventGridNamespace(string return GetEventGridNamespaces().Get(namespaceName, cancellationToken); } - /// Gets a collection of EventGridTopicResources in the ResourceGroupResource. - /// An object representing collection of EventGridTopicResources and their operations over a EventGridTopicResource. - public virtual EventGridTopicCollection GetEventGridTopics() + /// Gets an object representing a PartnerConfigurationResource along with the instance operations that can be performed on it in the ResourceGroupResource. + /// Returns a object. + public virtual PartnerConfigurationResource GetPartnerConfiguration() { - return GetCachedClient(client => new EventGridTopicCollection(client, Id)); + return new PartnerConfigurationResource(Client, Id.AppendProviderResource("Microsoft.EventGrid", "partnerConfigurations", "default")); + } + + /// Gets a collection of PartnerDestinationResources in the ResourceGroupResource. + /// An object representing collection of PartnerDestinationResources and their operations over a PartnerDestinationResource. + public virtual PartnerDestinationCollection GetPartnerDestinations() + { + return GetCachedClient(client => new PartnerDestinationCollection(client, Id)); } /// - /// Get properties of a topic. + /// Get properties of a partner destination. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} /// /// /// Operation Id - /// Topics_Get + /// PartnerDestinations_Get /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the topic. + /// Name of the partner destination. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetEventGridTopicAsync(string topicName, CancellationToken cancellationToken = default) + public virtual async Task> GetPartnerDestinationAsync(string partnerDestinationName, CancellationToken cancellationToken = default) { - return await GetEventGridTopics().GetAsync(topicName, cancellationToken).ConfigureAwait(false); + return await GetPartnerDestinations().GetAsync(partnerDestinationName, cancellationToken).ConfigureAwait(false); } /// - /// Get properties of a topic. + /// Get properties of a partner destination. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} /// /// /// Operation Id - /// Topics_Get + /// PartnerDestinations_Get /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the topic. + /// Name of the partner destination. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetEventGridTopic(string topicName, CancellationToken cancellationToken = default) + public virtual Response GetPartnerDestination(string partnerDestinationName, CancellationToken cancellationToken = default) { - return GetEventGridTopics().Get(topicName, cancellationToken); - } - - /// Gets an object representing a PartnerConfigurationResource along with the instance operations that can be performed on it in the ResourceGroupResource. - /// Returns a object. - public virtual PartnerConfigurationResource GetPartnerConfiguration() - { - return new PartnerConfigurationResource(Client, Id.AppendProviderResource("Microsoft.EventGrid", "partnerConfigurations", "default")); + return GetPartnerDestinations().Get(partnerDestinationName, cancellationToken); } /// Gets a collection of PartnerNamespaceResources in the ResourceGroupResource. @@ -280,7 +280,7 @@ public virtual PartnerNamespaceCollection GetPartnerNamespaces() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> GetPartnerNamespac /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -349,7 +349,7 @@ public virtual PartnerRegistrationCollection GetPartnerRegistrations() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> GetPartnerRegis /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -418,7 +418,7 @@ public virtual PartnerTopicCollection GetPartnerTopics() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetPartnerTopicAsync(s /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -487,7 +487,7 @@ public virtual SystemTopicCollection GetSystemTopics() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -518,7 +518,7 @@ public virtual async Task> GetSystemTopicAsync(str /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -535,5 +535,74 @@ public virtual Response GetSystemTopic(string systemTopicNa { return GetSystemTopics().Get(systemTopicName, cancellationToken); } + + /// Gets a collection of EventGridTopicResources in the ResourceGroupResource. + /// An object representing collection of EventGridTopicResources and their operations over a EventGridTopicResource. + public virtual EventGridTopicCollection GetEventGridTopics() + { + return GetCachedClient(client => new EventGridTopicCollection(client, Id)); + } + + /// + /// Get properties of a topic. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the topic. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEventGridTopicAsync(string topicName, CancellationToken cancellationToken = default) + { + return await GetEventGridTopics().GetAsync(topicName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get properties of a topic. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the topic. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEventGridTopic(string topicName, CancellationToken cancellationToken = default) + { + return GetEventGridTopics().Get(topicName, cancellationToken); + } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridSubscriptionResource.cs index 09c1d4617e2b..e828127d68bf 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridSubscriptionResource.cs @@ -22,10 +22,10 @@ public partial class MockableEventGridSubscriptionResource : ArmResource private EventSubscriptionsRestOperations _eventSubscriptionRestClient; private ClientDiagnostics _eventGridNamespaceNamespacesClientDiagnostics; private NamespacesRestOperations _eventGridNamespaceNamespacesRestClient; - private ClientDiagnostics _eventGridTopicTopicsClientDiagnostics; - private TopicsRestOperations _eventGridTopicTopicsRestClient; private ClientDiagnostics _partnerConfigurationClientDiagnostics; private PartnerConfigurationsRestOperations _partnerConfigurationRestClient; + private ClientDiagnostics _partnerDestinationClientDiagnostics; + private PartnerDestinationsRestOperations _partnerDestinationRestClient; private ClientDiagnostics _partnerNamespaceClientDiagnostics; private PartnerNamespacesRestOperations _partnerNamespaceRestClient; private ClientDiagnostics _partnerRegistrationClientDiagnostics; @@ -34,6 +34,8 @@ public partial class MockableEventGridSubscriptionResource : ArmResource private PartnerTopicsRestOperations _partnerTopicRestClient; private ClientDiagnostics _systemTopicClientDiagnostics; private SystemTopicsRestOperations _systemTopicRestClient; + private ClientDiagnostics _eventGridTopicTopicsClientDiagnostics; + private TopicsRestOperations _eventGridTopicTopicsRestClient; /// Initializes a new instance of the class for mocking. protected MockableEventGridSubscriptionResource() @@ -53,10 +55,10 @@ internal MockableEventGridSubscriptionResource(ArmClient client, ResourceIdentif private EventSubscriptionsRestOperations EventSubscriptionRestClient => _eventSubscriptionRestClient ??= new EventSubscriptionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EventSubscriptionResource.ResourceType)); private ClientDiagnostics EventGridNamespaceNamespacesClientDiagnostics => _eventGridNamespaceNamespacesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", EventGridNamespaceResource.ResourceType.Namespace, Diagnostics); private NamespacesRestOperations EventGridNamespaceNamespacesRestClient => _eventGridNamespaceNamespacesRestClient ??= new NamespacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EventGridNamespaceResource.ResourceType)); - private ClientDiagnostics EventGridTopicTopicsClientDiagnostics => _eventGridTopicTopicsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", EventGridTopicResource.ResourceType.Namespace, Diagnostics); - private TopicsRestOperations EventGridTopicTopicsRestClient => _eventGridTopicTopicsRestClient ??= new TopicsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EventGridTopicResource.ResourceType)); private ClientDiagnostics PartnerConfigurationClientDiagnostics => _partnerConfigurationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", PartnerConfigurationResource.ResourceType.Namespace, Diagnostics); private PartnerConfigurationsRestOperations PartnerConfigurationRestClient => _partnerConfigurationRestClient ??= new PartnerConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PartnerConfigurationResource.ResourceType)); + private ClientDiagnostics PartnerDestinationClientDiagnostics => _partnerDestinationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", PartnerDestinationResource.ResourceType.Namespace, Diagnostics); + private PartnerDestinationsRestOperations PartnerDestinationRestClient => _partnerDestinationRestClient ??= new PartnerDestinationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PartnerDestinationResource.ResourceType)); private ClientDiagnostics PartnerNamespaceClientDiagnostics => _partnerNamespaceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", PartnerNamespaceResource.ResourceType.Namespace, Diagnostics); private PartnerNamespacesRestOperations PartnerNamespaceRestClient => _partnerNamespaceRestClient ??= new PartnerNamespacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PartnerNamespaceResource.ResourceType)); private ClientDiagnostics PartnerRegistrationClientDiagnostics => _partnerRegistrationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", PartnerRegistrationResource.ResourceType.Namespace, Diagnostics); @@ -65,6 +67,8 @@ internal MockableEventGridSubscriptionResource(ArmClient client, ResourceIdentif private PartnerTopicsRestOperations PartnerTopicRestClient => _partnerTopicRestClient ??= new PartnerTopicsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PartnerTopicResource.ResourceType)); private ClientDiagnostics SystemTopicClientDiagnostics => _systemTopicClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", SystemTopicResource.ResourceType.Namespace, Diagnostics); private SystemTopicsRestOperations SystemTopicRestClient => _systemTopicRestClient ??= new SystemTopicsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SystemTopicResource.ResourceType)); + private ClientDiagnostics EventGridTopicTopicsClientDiagnostics => _eventGridTopicTopicsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", EventGridTopicResource.ResourceType.Namespace, Diagnostics); + private TopicsRestOperations EventGridTopicTopicsRestClient => _eventGridTopicTopicsRestClient ??= new TopicsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EventGridTopicResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -85,7 +89,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -117,7 +121,7 @@ public virtual AsyncPageable GetEventGridDomainsAsync(s /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -149,7 +153,7 @@ public virtual Pageable GetEventGridDomains(string filt /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -181,7 +185,7 @@ public virtual AsyncPageable GetEventGridNamespacesA /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -201,131 +205,131 @@ public virtual Pageable GetEventGridNamespaces(strin } /// - /// List all the topics under an Azure subscription. + /// List all the partner configurations under an Azure subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerConfigurations /// /// /// Operation Id - /// Topics_ListBySubscription + /// PartnerConfigurations_ListBySubscription /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// /// 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'. /// 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. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetEventGridTopicsAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetPartnerConfigurationsAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => EventGridTopicTopicsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EventGridTopicTopicsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicResource(Client, EventGridTopicData.DeserializeEventGridTopicData(e)), EventGridTopicTopicsClientDiagnostics, Pipeline, "MockableEventGridSubscriptionResource.GetEventGridTopics", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => PartnerConfigurationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PartnerConfigurationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PartnerConfigurationResource(Client, PartnerConfigurationData.DeserializePartnerConfigurationData(e)), PartnerConfigurationClientDiagnostics, Pipeline, "MockableEventGridSubscriptionResource.GetPartnerConfigurations", "value", "nextLink", cancellationToken); } /// - /// List all the topics under an Azure subscription. + /// List all the partner configurations under an Azure subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerConfigurations /// /// /// Operation Id - /// Topics_ListBySubscription + /// PartnerConfigurations_ListBySubscription /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// /// 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'. /// 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. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetEventGridTopics(string filter = null, int? top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetPartnerConfigurations(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => EventGridTopicTopicsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EventGridTopicTopicsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicResource(Client, EventGridTopicData.DeserializeEventGridTopicData(e)), EventGridTopicTopicsClientDiagnostics, Pipeline, "MockableEventGridSubscriptionResource.GetEventGridTopics", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => PartnerConfigurationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PartnerConfigurationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PartnerConfigurationResource(Client, PartnerConfigurationData.DeserializePartnerConfigurationData(e)), PartnerConfigurationClientDiagnostics, Pipeline, "MockableEventGridSubscriptionResource.GetPartnerConfigurations", "value", "nextLink", cancellationToken); } /// - /// List all the partner configurations under an Azure subscription. + /// List all the partner destinations under an Azure subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerConfigurations + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations /// /// /// Operation Id - /// PartnerConfigurations_ListBySubscription + /// PartnerDestinations_ListBySubscription /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// /// 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'. /// 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. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetPartnerConfigurationsAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetPartnerDestinationsAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => PartnerConfigurationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PartnerConfigurationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PartnerConfigurationResource(Client, PartnerConfigurationData.DeserializePartnerConfigurationData(e)), PartnerConfigurationClientDiagnostics, Pipeline, "MockableEventGridSubscriptionResource.GetPartnerConfigurations", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => PartnerDestinationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PartnerDestinationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PartnerDestinationResource(Client, PartnerDestinationData.DeserializePartnerDestinationData(e)), PartnerDestinationClientDiagnostics, Pipeline, "MockableEventGridSubscriptionResource.GetPartnerDestinations", "value", "nextLink", cancellationToken); } /// - /// List all the partner configurations under an Azure subscription. + /// List all the partner destinations under an Azure subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerConfigurations + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations /// /// /// Operation Id - /// PartnerConfigurations_ListBySubscription + /// PartnerDestinations_ListBySubscription /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource - /// + /// /// /// /// /// 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'. /// 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. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetPartnerConfigurations(string filter = null, int? top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetPartnerDestinations(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => PartnerConfigurationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PartnerConfigurationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PartnerConfigurationResource(Client, PartnerConfigurationData.DeserializePartnerConfigurationData(e)), PartnerConfigurationClientDiagnostics, Pipeline, "MockableEventGridSubscriptionResource.GetPartnerConfigurations", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => PartnerDestinationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PartnerDestinationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PartnerDestinationResource(Client, PartnerDestinationData.DeserializePartnerDestinationData(e)), PartnerDestinationClientDiagnostics, Pipeline, "MockableEventGridSubscriptionResource.GetPartnerDestinations", "value", "nextLink", cancellationToken); } /// @@ -341,7 +345,7 @@ public virtual Pageable GetPartnerConfigurations(s /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -373,7 +377,7 @@ public virtual AsyncPageable GetPartnerNamespacesAsync /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -405,7 +409,7 @@ public virtual Pageable GetPartnerNamespaces(string fi /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -437,7 +441,7 @@ public virtual AsyncPageable GetPartnerRegistration /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -469,7 +473,7 @@ public virtual Pageable GetPartnerRegistrations(str /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -501,7 +505,7 @@ public virtual AsyncPageable GetPartnerTopicsAsync(string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -533,7 +537,7 @@ public virtual Pageable GetPartnerTopics(string filter = n /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -565,7 +569,7 @@ public virtual AsyncPageable GetSystemTopicsAsync(string fi /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -583,5 +587,69 @@ public virtual Pageable GetSystemTopics(string filter = nul HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SystemTopicRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SystemTopicResource(Client, SystemTopicData.DeserializeSystemTopicData(e)), SystemTopicClientDiagnostics, Pipeline, "MockableEventGridSubscriptionResource.GetSystemTopics", "value", "nextLink", cancellationToken); } + + /// + /// List all the topics under an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics + /// + /// + /// Operation Id + /// Topics_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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'. + /// 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. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEventGridTopicsAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EventGridTopicTopicsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EventGridTopicTopicsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicResource(Client, EventGridTopicData.DeserializeEventGridTopicData(e)), EventGridTopicTopicsClientDiagnostics, Pipeline, "MockableEventGridSubscriptionResource.GetEventGridTopics", "value", "nextLink", cancellationToken); + } + + /// + /// List all the topics under an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics + /// + /// + /// Operation Id + /// Topics_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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'. + /// 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. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEventGridTopics(string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EventGridTopicTopicsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EventGridTopicTopicsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicResource(Client, EventGridTopicData.DeserializeEventGridTopicData(e)), EventGridTopicTopicsClientDiagnostics, Pipeline, "MockableEventGridSubscriptionResource.GetEventGridTopics", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridTenantResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridTenantResource.cs index 1f759cf2a1af..3ac5f3cb2277 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridTenantResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/MockableEventGridTenantResource.cs @@ -53,7 +53,7 @@ public virtual TopicTypeCollection GetTopicTypes() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetTopicTypeAsync(string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -122,7 +122,7 @@ public virtual VerifiedPartnerCollection GetVerifiedPartners() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetVerifiedPartnerA /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/DomainNetworkSecurityPerimeterConfigurationOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/DomainNetworkSecurityPerimeterConfigurationOperationSource.cs new file mode 100644 index 000000000000..b6e64d437f13 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/DomainNetworkSecurityPerimeterConfigurationOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid +{ + internal class DomainNetworkSecurityPerimeterConfigurationOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DomainNetworkSecurityPerimeterConfigurationOperationSource(ArmClient client) + { + _client = client; + } + + DomainNetworkSecurityPerimeterConfigurationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DomainNetworkSecurityPerimeterConfigurationResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DomainNetworkSecurityPerimeterConfigurationResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/PartnerDestinationOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/PartnerDestinationOperationSource.cs new file mode 100644 index 000000000000..7f4248134b5f --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/PartnerDestinationOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid +{ + internal class PartnerDestinationOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal PartnerDestinationOperationSource(ArmClient client) + { + _client = client; + } + + PartnerDestinationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new PartnerDestinationResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new PartnerDestinationResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/TopicNetworkSecurityPerimeterConfigurationOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/TopicNetworkSecurityPerimeterConfigurationOperationSource.cs new file mode 100644 index 000000000000..12b2dfc258e4 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/TopicNetworkSecurityPerimeterConfigurationOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid +{ + internal class TopicNetworkSecurityPerimeterConfigurationOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal TopicNetworkSecurityPerimeterConfigurationOperationSource(ArmClient client) + { + _client = client; + } + + TopicNetworkSecurityPerimeterConfigurationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new TopicNetworkSecurityPerimeterConfigurationResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new TopicNetworkSecurityPerimeterConfigurationResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AlternativeAuthenticationNameSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AlternativeAuthenticationNameSource.cs new file mode 100644 index 000000000000..e91d3cf4536d --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AlternativeAuthenticationNameSource.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Alternative authentication name sources related to client authentication settings for namespace resource. + public readonly partial struct AlternativeAuthenticationNameSource : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AlternativeAuthenticationNameSource(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ClientCertificateSubjectValue = "ClientCertificateSubject"; + private const string ClientCertificateDnsValue = "ClientCertificateDns"; + private const string ClientCertificateUriValue = "ClientCertificateUri"; + private const string ClientCertificateIPValue = "ClientCertificateIp"; + private const string ClientCertificateEmailValue = "ClientCertificateEmail"; + + /// ClientCertificateSubject. + public static AlternativeAuthenticationNameSource ClientCertificateSubject { get; } = new AlternativeAuthenticationNameSource(ClientCertificateSubjectValue); + /// ClientCertificateDns. + public static AlternativeAuthenticationNameSource ClientCertificateDns { get; } = new AlternativeAuthenticationNameSource(ClientCertificateDnsValue); + /// ClientCertificateUri. + public static AlternativeAuthenticationNameSource ClientCertificateUri { get; } = new AlternativeAuthenticationNameSource(ClientCertificateUriValue); + /// ClientCertificateIp. + public static AlternativeAuthenticationNameSource ClientCertificateIP { get; } = new AlternativeAuthenticationNameSource(ClientCertificateIPValue); + /// ClientCertificateEmail. + public static AlternativeAuthenticationNameSource ClientCertificateEmail { get; } = new AlternativeAuthenticationNameSource(ClientCertificateEmailValue); + /// Determines if two values are the same. + public static bool operator ==(AlternativeAuthenticationNameSource left, AlternativeAuthenticationNameSource right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AlternativeAuthenticationNameSource left, AlternativeAuthenticationNameSource right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AlternativeAuthenticationNameSource(string value) => new AlternativeAuthenticationNameSource(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AlternativeAuthenticationNameSource other && Equals(other); + /// + public bool Equals(AlternativeAuthenticationNameSource other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs new file mode 100644 index 000000000000..930f936567b1 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class AzureADPartnerClientAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureADPartnerClientAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(AzureActiveDirectoryTenantId)) + { + writer.WritePropertyName("azureActiveDirectoryTenantId"u8); + writer.WriteStringValue(AzureActiveDirectoryTenantId); + } + if (Optional.IsDefined(AzureActiveDirectoryApplicationIdOrUri)) + { + writer.WritePropertyName("azureActiveDirectoryApplicationIdOrUri"u8); + writer.WriteStringValue(AzureActiveDirectoryApplicationIdOrUri.AbsoluteUri); + } + writer.WriteEndObject(); + } + + AzureADPartnerClientAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureADPartnerClientAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureADPartnerClientAuthentication(document.RootElement, options); + } + + internal static AzureADPartnerClientAuthentication DeserializeAzureADPartnerClientAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PartnerClientAuthenticationType clientAuthenticationType = default; + string azureActiveDirectoryTenantId = default; + Uri azureActiveDirectoryApplicationIdOrUri = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientAuthenticationType"u8)) + { + clientAuthenticationType = new PartnerClientAuthenticationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("azureActiveDirectoryTenantId"u8)) + { + azureActiveDirectoryTenantId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("azureActiveDirectoryApplicationIdOrUri"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureActiveDirectoryApplicationIdOrUri = new Uri(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureADPartnerClientAuthentication(clientAuthenticationType, serializedAdditionalRawData, azureActiveDirectoryTenantId, azureActiveDirectoryApplicationIdOrUri); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientAuthenticationType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientAuthenticationType: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" clientAuthenticationType: "); + builder.AppendLine($"'{ClientAuthenticationType.ToString()}'"); + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureActiveDirectoryTenantId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureActiveDirectoryTenantId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AzureActiveDirectoryTenantId)) + { + builder.Append(" azureActiveDirectoryTenantId: "); + if (AzureActiveDirectoryTenantId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AzureActiveDirectoryTenantId}'''"); + } + else + { + builder.AppendLine($"'{AzureActiveDirectoryTenantId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureActiveDirectoryApplicationIdOrUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureActiveDirectoryApplicationIdOrUri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AzureActiveDirectoryApplicationIdOrUri)) + { + builder.Append(" azureActiveDirectoryApplicationIdOrUri: "); + builder.AppendLine($"'{AzureActiveDirectoryApplicationIdOrUri.AbsoluteUri}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AzureADPartnerClientAuthentication)} does not support writing '{options.Format}' format."); + } + } + + AzureADPartnerClientAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureADPartnerClientAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureADPartnerClientAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.cs new file mode 100644 index 000000000000..1046645b3b8c --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Microsoft Entra ID Partner Client Authentication. + public partial class AzureADPartnerClientAuthentication : PartnerClientAuthentication + { + /// Initializes a new instance of . + public AzureADPartnerClientAuthentication() + { + ClientAuthenticationType = PartnerClientAuthenticationType.AzureAD; + } + + /// Initializes a new instance of . + /// Type of client authentication. + /// Keeps track of any properties unknown to the library. + /// The Microsoft Entra ID Tenant ID to get the access token that will be included as the bearer token in delivery requests. + /// The Microsoft Entra ID Application ID or URI to get the access token that will be included as the bearer token in delivery requests. + internal AzureADPartnerClientAuthentication(PartnerClientAuthenticationType clientAuthenticationType, IDictionary serializedAdditionalRawData, string azureActiveDirectoryTenantId, Uri azureActiveDirectoryApplicationIdOrUri) : base(clientAuthenticationType, serializedAdditionalRawData) + { + AzureActiveDirectoryTenantId = azureActiveDirectoryTenantId; + AzureActiveDirectoryApplicationIdOrUri = azureActiveDirectoryApplicationIdOrUri; + ClientAuthenticationType = clientAuthenticationType; + } + + /// The Microsoft Entra ID Tenant ID to get the access token that will be included as the bearer token in delivery requests. + [WirePath("properties.azureActiveDirectoryTenantId")] + public string AzureActiveDirectoryTenantId { get; set; } + /// The Microsoft Entra ID Application ID or URI to get the access token that will be included as the bearer token in delivery requests. + [WirePath("properties.azureActiveDirectoryApplicationIdOrUri")] + public Uri AzureActiveDirectoryApplicationIdOrUri { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs new file mode 100644 index 000000000000..9b320b29b049 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class ClientAuthenticationSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClientAuthenticationSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AlternativeAuthenticationNameSources)) + { + writer.WritePropertyName("alternativeAuthenticationNameSources"u8); + writer.WriteStartArray(); + foreach (var item in AlternativeAuthenticationNameSources) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(CustomJwtAuthentication)) + { + writer.WritePropertyName("customJwtAuthentication"u8); + writer.WriteObjectValue(CustomJwtAuthentication, options); + } + if (Optional.IsDefined(WebhookAuthentication)) + { + writer.WritePropertyName("webhookAuthentication"u8); + writer.WriteObjectValue(WebhookAuthentication, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ClientAuthenticationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClientAuthenticationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeClientAuthenticationSettings(document.RootElement, options); + } + + internal static ClientAuthenticationSettings DeserializeClientAuthenticationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList alternativeAuthenticationNameSources = default; + CustomJwtAuthenticationSettings customJwtAuthentication = default; + WebhookAuthenticationSettings webhookAuthentication = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("alternativeAuthenticationNameSources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new AlternativeAuthenticationNameSource(item.GetString())); + } + alternativeAuthenticationNameSources = array; + continue; + } + if (property.NameEquals("customJwtAuthentication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customJwtAuthentication = CustomJwtAuthenticationSettings.DeserializeCustomJwtAuthenticationSettings(property.Value, options); + continue; + } + if (property.NameEquals("webhookAuthentication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + webhookAuthentication = WebhookAuthenticationSettings.DeserializeWebhookAuthenticationSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ClientAuthenticationSettings(alternativeAuthenticationNameSources ?? new ChangeTrackingList(), customJwtAuthentication, webhookAuthentication, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AlternativeAuthenticationNameSources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" alternativeAuthenticationNameSources: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AlternativeAuthenticationNameSources)) + { + if (AlternativeAuthenticationNameSources.Any()) + { + builder.Append(" alternativeAuthenticationNameSources: "); + builder.AppendLine("["); + foreach (var item in AlternativeAuthenticationNameSources) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomJwtAuthentication), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customJwtAuthentication: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CustomJwtAuthentication)) + { + builder.Append(" customJwtAuthentication: "); + BicepSerializationHelpers.AppendChildObject(builder, CustomJwtAuthentication, options, 2, false, " customJwtAuthentication: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WebhookAuthentication), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" webhookAuthentication: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WebhookAuthentication)) + { + builder.Append(" webhookAuthentication: "); + BicepSerializationHelpers.AppendChildObject(builder, WebhookAuthentication, options, 2, false, " webhookAuthentication: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ClientAuthenticationSettings)} does not support writing '{options.Format}' format."); + } + } + + ClientAuthenticationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeClientAuthenticationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ClientAuthenticationSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.cs new file mode 100644 index 000000000000..4e19df6bdfd7 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Client authentication settings for namespace resource. + public partial class ClientAuthenticationSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ClientAuthenticationSettings() + { + AlternativeAuthenticationNameSources = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Alternative authentication name sources related to client authentication settings for namespace resource. + /// Custom JWT authentication settings for namespace resource. + /// Authentication settings for a webhook endpoint within a Namespace resource. + /// Keeps track of any properties unknown to the library. + internal ClientAuthenticationSettings(IList alternativeAuthenticationNameSources, CustomJwtAuthenticationSettings customJwtAuthentication, WebhookAuthenticationSettings webhookAuthentication, IDictionary serializedAdditionalRawData) + { + AlternativeAuthenticationNameSources = alternativeAuthenticationNameSources; + CustomJwtAuthentication = customJwtAuthentication; + WebhookAuthentication = webhookAuthentication; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Alternative authentication name sources related to client authentication settings for namespace resource. + [WirePath("alternativeAuthenticationNameSources")] + public IList AlternativeAuthenticationNameSources { get; } + /// Custom JWT authentication settings for namespace resource. + [WirePath("customJwtAuthentication")] + public CustomJwtAuthenticationSettings CustomJwtAuthentication { get; set; } + /// Authentication settings for a webhook endpoint within a Namespace resource. + [WirePath("webhookAuthentication")] + public WebhookAuthenticationSettings WebhookAuthentication { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs new file mode 100644 index 000000000000..824543907e37 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class CustomJwtAuthenticationManagedIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomJwtAuthenticationManagedIdentity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(IdentityType.ToString()); + if (Optional.IsDefined(UserAssignedIdentity)) + { + writer.WritePropertyName("userAssignedIdentity"u8); + writer.WriteStringValue(UserAssignedIdentity); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomJwtAuthenticationManagedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomJwtAuthenticationManagedIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomJwtAuthenticationManagedIdentity(document.RootElement, options); + } + + internal static CustomJwtAuthenticationManagedIdentity DeserializeCustomJwtAuthenticationManagedIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CustomJwtAuthenticationManagedIdentityType type = default; + ResourceIdentifier userAssignedIdentity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new CustomJwtAuthenticationManagedIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedIdentity = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomJwtAuthenticationManagedIdentity(type, userAssignedIdentity, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" type: "); + builder.AppendLine($"'{IdentityType.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserAssignedIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userAssignedIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserAssignedIdentity)) + { + builder.Append(" userAssignedIdentity: "); + builder.AppendLine($"'{UserAssignedIdentity.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CustomJwtAuthenticationManagedIdentity)} does not support writing '{options.Format}' format."); + } + } + + CustomJwtAuthenticationManagedIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomJwtAuthenticationManagedIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomJwtAuthenticationManagedIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.cs new file mode 100644 index 000000000000..a67741d22ae3 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// The identity information for retrieving the certificate for custom JWT authentication. + public partial class CustomJwtAuthenticationManagedIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. + public CustomJwtAuthenticationManagedIdentity(CustomJwtAuthenticationManagedIdentityType identityType) + { + IdentityType = identityType; + } + + /// Initializes a new instance of . + /// The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. + /// The user identity associated with the resource. + /// Keeps track of any properties unknown to the library. + internal CustomJwtAuthenticationManagedIdentity(CustomJwtAuthenticationManagedIdentityType identityType, ResourceIdentifier userAssignedIdentity, IDictionary serializedAdditionalRawData) + { + IdentityType = identityType; + UserAssignedIdentity = userAssignedIdentity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CustomJwtAuthenticationManagedIdentity() + { + } + + /// The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. + [WirePath("type")] + public CustomJwtAuthenticationManagedIdentityType IdentityType { get; set; } + /// The user identity associated with the resource. + [WirePath("userAssignedIdentity")] + public ResourceIdentifier UserAssignedIdentity { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentityType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentityType.cs new file mode 100644 index 000000000000..ff5cf78dc797 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentityType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. + public readonly partial struct CustomJwtAuthenticationManagedIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CustomJwtAuthenticationManagedIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemAssignedValue = "SystemAssigned"; + private const string UserAssignedValue = "UserAssigned"; + + /// SystemAssigned. + public static CustomJwtAuthenticationManagedIdentityType SystemAssigned { get; } = new CustomJwtAuthenticationManagedIdentityType(SystemAssignedValue); + /// UserAssigned. + public static CustomJwtAuthenticationManagedIdentityType UserAssigned { get; } = new CustomJwtAuthenticationManagedIdentityType(UserAssignedValue); + /// Determines if two values are the same. + public static bool operator ==(CustomJwtAuthenticationManagedIdentityType left, CustomJwtAuthenticationManagedIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CustomJwtAuthenticationManagedIdentityType left, CustomJwtAuthenticationManagedIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CustomJwtAuthenticationManagedIdentityType(string value) => new CustomJwtAuthenticationManagedIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CustomJwtAuthenticationManagedIdentityType other && Equals(other); + /// + public bool Equals(CustomJwtAuthenticationManagedIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs new file mode 100644 index 000000000000..4baaaa72c88e --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class CustomJwtAuthenticationSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomJwtAuthenticationSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(TokenIssuer)) + { + writer.WritePropertyName("tokenIssuer"u8); + writer.WriteStringValue(TokenIssuer); + } + if (Optional.IsCollectionDefined(IssuerCertificates)) + { + writer.WritePropertyName("issuerCertificates"u8); + writer.WriteStartArray(); + foreach (var item in IssuerCertificates) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EncodedIssuerCertificates)) + { + writer.WritePropertyName("encodedIssuerCertificates"u8); + writer.WriteStartArray(); + foreach (var item in EncodedIssuerCertificates) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomJwtAuthenticationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomJwtAuthenticationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomJwtAuthenticationSettings(document.RootElement, options); + } + + internal static CustomJwtAuthenticationSettings DeserializeCustomJwtAuthenticationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string tokenIssuer = default; + IList issuerCertificates = default; + IList encodedIssuerCertificates = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tokenIssuer"u8)) + { + tokenIssuer = property.Value.GetString(); + continue; + } + if (property.NameEquals("issuerCertificates"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(IssuerCertificateInfo.DeserializeIssuerCertificateInfo(item, options)); + } + issuerCertificates = array; + continue; + } + if (property.NameEquals("encodedIssuerCertificates"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EncodedIssuerCertificateInfo.DeserializeEncodedIssuerCertificateInfo(item, options)); + } + encodedIssuerCertificates = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomJwtAuthenticationSettings(tokenIssuer, issuerCertificates ?? new ChangeTrackingList(), encodedIssuerCertificates ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TokenIssuer), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tokenIssuer: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TokenIssuer)) + { + builder.Append(" tokenIssuer: "); + if (TokenIssuer.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TokenIssuer}'''"); + } + else + { + builder.AppendLine($"'{TokenIssuer}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IssuerCertificates), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" issuerCertificates: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(IssuerCertificates)) + { + if (IssuerCertificates.Any()) + { + builder.Append(" issuerCertificates: "); + builder.AppendLine("["); + foreach (var item in IssuerCertificates) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " issuerCertificates: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EncodedIssuerCertificates), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" encodedIssuerCertificates: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EncodedIssuerCertificates)) + { + if (EncodedIssuerCertificates.Any()) + { + builder.Append(" encodedIssuerCertificates: "); + builder.AppendLine("["); + foreach (var item in EncodedIssuerCertificates) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " encodedIssuerCertificates: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CustomJwtAuthenticationSettings)} does not support writing '{options.Format}' format."); + } + } + + CustomJwtAuthenticationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomJwtAuthenticationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomJwtAuthenticationSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.cs new file mode 100644 index 000000000000..2aa6262f8d8e --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Custom JWT authentication settings for namespace resource. + public partial class CustomJwtAuthenticationSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CustomJwtAuthenticationSettings() + { + IssuerCertificates = new ChangeTrackingList(); + EncodedIssuerCertificates = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Expected JWT token issuer. + /// Information about the certificates that are used for token validation. We currently support maximum 2 certificates. + /// Information about the encoded public certificates that are used for custom authentication. + /// Keeps track of any properties unknown to the library. + internal CustomJwtAuthenticationSettings(string tokenIssuer, IList issuerCertificates, IList encodedIssuerCertificates, IDictionary serializedAdditionalRawData) + { + TokenIssuer = tokenIssuer; + IssuerCertificates = issuerCertificates; + EncodedIssuerCertificates = encodedIssuerCertificates; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Expected JWT token issuer. + [WirePath("tokenIssuer")] + public string TokenIssuer { get; set; } + /// Information about the certificates that are used for token validation. We currently support maximum 2 certificates. + [WirePath("issuerCertificates")] + public IList IssuerCertificates { get; } + /// Information about the encoded public certificates that are used for custom authentication. + [WirePath("encodedIssuerCertificates")] + public IList EncodedIssuerCertificates { get; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentity.Serialization.cs new file mode 100644 index 000000000000..924faaefebe1 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentity.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class CustomWebhookAuthenticationManagedIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomWebhookAuthenticationManagedIdentity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(IdentityType.ToString()); + if (Optional.IsDefined(UserAssignedIdentity)) + { + writer.WritePropertyName("userAssignedIdentity"u8); + writer.WriteStringValue(UserAssignedIdentity); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomWebhookAuthenticationManagedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomWebhookAuthenticationManagedIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomWebhookAuthenticationManagedIdentity(document.RootElement, options); + } + + internal static CustomWebhookAuthenticationManagedIdentity DeserializeCustomWebhookAuthenticationManagedIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CustomWebhookAuthenticationManagedIdentityType type = default; + ResourceIdentifier userAssignedIdentity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new CustomWebhookAuthenticationManagedIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedIdentity = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomWebhookAuthenticationManagedIdentity(type, userAssignedIdentity, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" type: "); + builder.AppendLine($"'{IdentityType.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserAssignedIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userAssignedIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserAssignedIdentity)) + { + builder.Append(" userAssignedIdentity: "); + builder.AppendLine($"'{UserAssignedIdentity.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CustomWebhookAuthenticationManagedIdentity)} does not support writing '{options.Format}' format."); + } + } + + CustomWebhookAuthenticationManagedIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomWebhookAuthenticationManagedIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomWebhookAuthenticationManagedIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentity.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentity.cs new file mode 100644 index 000000000000..0df0e861da18 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentity.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// The identity configuration required for authenticating a custom webhook. + public partial class CustomWebhookAuthenticationManagedIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. + public CustomWebhookAuthenticationManagedIdentity(CustomWebhookAuthenticationManagedIdentityType identityType) + { + IdentityType = identityType; + } + + /// Initializes a new instance of . + /// The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. + /// The user identity associated with the resource. + /// Keeps track of any properties unknown to the library. + internal CustomWebhookAuthenticationManagedIdentity(CustomWebhookAuthenticationManagedIdentityType identityType, ResourceIdentifier userAssignedIdentity, IDictionary serializedAdditionalRawData) + { + IdentityType = identityType; + UserAssignedIdentity = userAssignedIdentity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CustomWebhookAuthenticationManagedIdentity() + { + } + + /// The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. + [WirePath("type")] + public CustomWebhookAuthenticationManagedIdentityType IdentityType { get; set; } + /// The user identity associated with the resource. + [WirePath("userAssignedIdentity")] + public ResourceIdentifier UserAssignedIdentity { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentityType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentityType.cs new file mode 100644 index 000000000000..8e5ad6e3bc0e --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomWebhookAuthenticationManagedIdentityType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. + public readonly partial struct CustomWebhookAuthenticationManagedIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CustomWebhookAuthenticationManagedIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemAssignedValue = "SystemAssigned"; + private const string UserAssignedValue = "UserAssigned"; + + /// SystemAssigned. + public static CustomWebhookAuthenticationManagedIdentityType SystemAssigned { get; } = new CustomWebhookAuthenticationManagedIdentityType(SystemAssignedValue); + /// UserAssigned. + public static CustomWebhookAuthenticationManagedIdentityType UserAssigned { get; } = new CustomWebhookAuthenticationManagedIdentityType(UserAssignedValue); + /// Determines if two values are the same. + public static bool operator ==(CustomWebhookAuthenticationManagedIdentityType left, CustomWebhookAuthenticationManagedIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CustomWebhookAuthenticationManagedIdentityType left, CustomWebhookAuthenticationManagedIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CustomWebhookAuthenticationManagedIdentityType(string value) => new CustomWebhookAuthenticationManagedIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CustomWebhookAuthenticationManagedIdentityType other && Equals(other); + /// + public bool Equals(CustomWebhookAuthenticationManagedIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.cs index f0e648b1d588..c08591ffc90f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.cs @@ -56,7 +56,7 @@ public DeliveryWithResourceIdentity() /// 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. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , and . /// /// Keeps track of any properties unknown to the library. internal DeliveryWithResourceIdentity(EventSubscriptionIdentity identity, EventSubscriptionDestination destination, IDictionary serializedAdditionalRawData) @@ -73,7 +73,7 @@ internal DeliveryWithResourceIdentity(EventSubscriptionIdentity identity, EventS /// 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. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , and . /// [WirePath("destination")] public EventSubscriptionDestination Destination { get; set; } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EncodedIssuerCertificateInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EncodedIssuerCertificateInfo.Serialization.cs new file mode 100644 index 000000000000..774ef436d512 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EncodedIssuerCertificateInfo.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class EncodedIssuerCertificateInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EncodedIssuerCertificateInfo)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("kid"u8); + writer.WriteStringValue(Kid); + writer.WritePropertyName("encodedCertificate"u8); + writer.WriteStringValue(EncodedCertificate); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EncodedIssuerCertificateInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EncodedIssuerCertificateInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEncodedIssuerCertificateInfo(document.RootElement, options); + } + + internal static EncodedIssuerCertificateInfo DeserializeEncodedIssuerCertificateInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kid = default; + string encodedCertificate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kid"u8)) + { + kid = property.Value.GetString(); + continue; + } + if (property.NameEquals("encodedCertificate"u8)) + { + encodedCertificate = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EncodedIssuerCertificateInfo(kid, encodedCertificate, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kid), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kid: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kid)) + { + builder.Append(" kid: "); + if (Kid.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kid}'''"); + } + else + { + builder.AppendLine($"'{Kid}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EncodedCertificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" encodedCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EncodedCertificate)) + { + builder.Append(" encodedCertificate: "); + if (EncodedCertificate.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EncodedCertificate}'''"); + } + else + { + builder.AppendLine($"'{EncodedCertificate}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(EncodedIssuerCertificateInfo)} does not support writing '{options.Format}' format."); + } + } + + EncodedIssuerCertificateInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEncodedIssuerCertificateInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EncodedIssuerCertificateInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EncodedIssuerCertificateInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EncodedIssuerCertificateInfo.cs new file mode 100644 index 000000000000..750efbc34f74 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EncodedIssuerCertificateInfo.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Information about the public certificate that is used for custom authentication. + public partial class EncodedIssuerCertificateInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Identifier for the certificate. + /// Certificate in pem format. + /// or is null. + public EncodedIssuerCertificateInfo(string kid, string encodedCertificate) + { + Argument.AssertNotNull(kid, nameof(kid)); + Argument.AssertNotNull(encodedCertificate, nameof(encodedCertificate)); + + Kid = kid; + EncodedCertificate = encodedCertificate; + } + + /// Initializes a new instance of . + /// Identifier for the certificate. + /// Certificate in pem format. + /// Keeps track of any properties unknown to the library. + internal EncodedIssuerCertificateInfo(string kid, string encodedCertificate, IDictionary serializedAdditionalRawData) + { + Kid = kid; + EncodedCertificate = encodedCertificate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EncodedIssuerCertificateInfo() + { + } + + /// Identifier for the certificate. + [WirePath("kid")] + public string Kid { get; set; } + /// Certificate in pem format. + [WirePath("encodedCertificate")] + public string EncodedCertificate { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EndpointType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EndpointType.cs index dd532ea99b39..50130ef679a3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EndpointType.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EndpointType.cs @@ -29,6 +29,7 @@ public EndpointType(string value) private const string ServiceBusQueueValue = "ServiceBusQueue"; private const string ServiceBusTopicValue = "ServiceBusTopic"; private const string AzureFunctionValue = "AzureFunction"; + private const string PartnerDestinationValue = "PartnerDestination"; private const string MonitorAlertValue = "MonitorAlert"; private const string NamespaceTopicValue = "NamespaceTopic"; @@ -46,6 +47,8 @@ public EndpointType(string value) public static EndpointType ServiceBusTopic { get; } = new EndpointType(ServiceBusTopicValue); /// AzureFunction. public static EndpointType AzureFunction { get; } = new EndpointType(AzureFunctionValue); + /// PartnerDestination. + public static EndpointType PartnerDestination { get; } = new EndpointType(PartnerDestinationValue); /// MonitorAlert. public static EndpointType MonitorAlert { get; } = new EndpointType(MonitorAlertValue); /// NamespaceTopic. diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs index 4e52c8941aad..0f4e7e2455d0 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs @@ -51,6 +51,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublicNetworkAccess)) @@ -138,6 +143,7 @@ internal static EventGridDomainPatch DeserializeEventGridDomainPatch(JsonElement } IDictionary tags = default; ManagedServiceIdentity identity = default; + ResourceSku sku = default; EventGridPublicNetworkAccess? publicNetworkAccess = default; IList inboundIPRules = default; TlsVersion? minimumTlsVersionAllowed = default; @@ -173,6 +179,15 @@ internal static EventGridDomainPatch DeserializeEventGridDomainPatch(JsonElement identity = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = ResourceSku.DeserializeResourceSku(property.Value, options); + continue; + } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -271,6 +286,7 @@ internal static EventGridDomainPatch DeserializeEventGridDomainPatch(JsonElement return new EventGridDomainPatch( tags ?? new ChangeTrackingDictionary(), identity, + sku, publicNetworkAccess, inboundIPRules ?? new ChangeTrackingList(), minimumTlsVersionAllowed, diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.cs index 3bc16e3b81f2..334ece25d583 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.cs @@ -56,13 +56,14 @@ public EventGridDomainPatch() /// Initializes a new instance of . /// Tags of the domains resource. /// Identity information for the resource. + /// The Sku pricing tier for the domain. /// /// 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" /> /// /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. /// Minimum TLS version of the publisher allowed to publish to this 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. + /// This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the domain. /// /// 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. @@ -84,10 +85,11 @@ public EventGridDomainPatch() /// The data residency boundary for the domain. /// The eventTypeInfo for the domain. /// Keeps track of any properties unknown to the library. - internal EventGridDomainPatch(IDictionary tags, ManagedServiceIdentity identity, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, TlsVersion? minimumTlsVersionAllowed, bool? isLocalAuthDisabled, bool? autoCreateTopicWithFirstSubscription, bool? autoDeleteTopicWithLastSubscription, DataResidencyBoundary? dataResidencyBoundary, PartnerTopicEventTypeInfo eventTypeInfo, IDictionary serializedAdditionalRawData) + internal EventGridDomainPatch(IDictionary tags, ManagedServiceIdentity identity, ResourceSku sku, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, TlsVersion? minimumTlsVersionAllowed, bool? isLocalAuthDisabled, bool? autoCreateTopicWithFirstSubscription, bool? autoDeleteTopicWithLastSubscription, DataResidencyBoundary? dataResidencyBoundary, PartnerTopicEventTypeInfo eventTypeInfo, IDictionary serializedAdditionalRawData) { Tags = tags; Identity = identity; + Sku = sku; PublicNetworkAccess = publicNetworkAccess; InboundIPRules = inboundIPRules; MinimumTlsVersionAllowed = minimumTlsVersionAllowed; @@ -105,6 +107,21 @@ internal EventGridDomainPatch(IDictionary tags, ManagedServiceId /// Identity information for the resource. [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } + /// The Sku pricing tier for the domain. + internal ResourceSku Sku { get; set; } + /// The Sku name of the resource. The possible values are: Basic or Premium. + [WirePath("sku.name")] + public EventGridSku? SkuName + { + get => Sku is null ? default : Sku.Name; + set + { + if (Sku is null) + Sku = new ResourceSku(); + Sku.Name = value; + } + } + /// /// 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" /> @@ -117,7 +134,7 @@ internal EventGridDomainPatch(IDictionary tags, ManagedServiceId /// Minimum TLS version of the publisher allowed to publish to this domain. [WirePath("properties.minimumTlsVersionAllowed")] public TlsVersion? MinimumTlsVersionAllowed { get; set; } - /// 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 Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the domain. [WirePath("properties.disableLocalAuth")] public bool? IsLocalAuthDisabled { get; set; } /// diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPublicNetworkAccess.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPublicNetworkAccess.cs index 55926d0788bc..d8a476c085c3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPublicNetworkAccess.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPublicNetworkAccess.cs @@ -27,11 +27,14 @@ public EventGridPublicNetworkAccess(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; + private const string SecuredByPerimeterValue = "SecuredByPerimeter"; /// Enabled. public static EventGridPublicNetworkAccess Enabled { get; } = new EventGridPublicNetworkAccess(EnabledValue); /// Disabled. public static EventGridPublicNetworkAccess Disabled { get; } = new EventGridPublicNetworkAccess(DisabledValue); + /// SecuredByPerimeter. + public static EventGridPublicNetworkAccess SecuredByPerimeter { get; } = new EventGridPublicNetworkAccess(SecuredByPerimeterValue); /// Determines if two values are the same. public static bool operator ==(EventGridPublicNetworkAccess left, EventGridPublicNetworkAccess right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSku.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSku.cs new file mode 100644 index 000000000000..eaefd3c37172 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSku.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// The Sku name of the resource. The possible values are: Basic or Premium. + public readonly partial struct EventGridSku : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EventGridSku(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string PremiumValue = "Premium"; + + /// Basic. + public static EventGridSku Basic { get; } = new EventGridSku(BasicValue); + /// Premium. + public static EventGridSku Premium { get; } = new EventGridSku(PremiumValue); + /// Determines if two values are the same. + public static bool operator ==(EventGridSku left, EventGridSku right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EventGridSku left, EventGridSku right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EventGridSku(string value) => new EventGridSku(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EventGridSku other && Equals(other); + /// + public bool Equals(EventGridSku other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.cs index 318a190aafc7..f22db408311f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.cs @@ -56,7 +56,7 @@ public EventGridSubscriptionPatch() /// 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. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , and . /// /// /// Information about the destination where events have to be delivered for the event subscription. @@ -96,7 +96,7 @@ internal EventGridSubscriptionPatch(EventSubscriptionDestination destination, De /// 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. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , and . /// [WirePath("destination")] public EventSubscriptionDestination Destination { get; set; } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs index 9b09cada10c2..742b3a7fdb93 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs @@ -51,6 +51,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublicNetworkAccess)) @@ -128,6 +133,7 @@ internal static EventGridTopicPatch DeserializeEventGridTopicPatch(JsonElement e } IDictionary tags = default; ManagedServiceIdentity identity = default; + ResourceSku sku = default; EventGridPublicNetworkAccess? publicNetworkAccess = default; IList inboundIPRules = default; TlsVersion? minimumTlsVersionAllowed = default; @@ -161,6 +167,15 @@ internal static EventGridTopicPatch DeserializeEventGridTopicPatch(JsonElement e identity = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = ResourceSku.DeserializeResourceSku(property.Value, options); + continue; + } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -241,6 +256,7 @@ internal static EventGridTopicPatch DeserializeEventGridTopicPatch(JsonElement e return new EventGridTopicPatch( tags ?? new ChangeTrackingDictionary(), identity, + sku, publicNetworkAccess, inboundIPRules ?? new ChangeTrackingList(), minimumTlsVersionAllowed, diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.cs index 373a07bebc2a..ed2151545c3c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.cs @@ -56,20 +56,22 @@ public EventGridTopicPatch() /// Initializes a new instance of . /// Tags of the Topic resource. /// Topic resource identity information. + /// The Sku pricing tier for the topic. /// /// 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" /> /// /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. /// Minimum TLS version of the publisher allowed to publish to this 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 topic. + /// This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the topic. /// The data residency boundary for the topic. /// The eventTypeInfo for the topic. /// Keeps track of any properties unknown to the library. - internal EventGridTopicPatch(IDictionary tags, ManagedServiceIdentity identity, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, TlsVersion? minimumTlsVersionAllowed, bool? isLocalAuthDisabled, DataResidencyBoundary? dataResidencyBoundary, PartnerTopicEventTypeInfo eventTypeInfo, IDictionary serializedAdditionalRawData) + internal EventGridTopicPatch(IDictionary tags, ManagedServiceIdentity identity, ResourceSku sku, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, TlsVersion? minimumTlsVersionAllowed, bool? isLocalAuthDisabled, DataResidencyBoundary? dataResidencyBoundary, PartnerTopicEventTypeInfo eventTypeInfo, IDictionary serializedAdditionalRawData) { Tags = tags; Identity = identity; + Sku = sku; PublicNetworkAccess = publicNetworkAccess; InboundIPRules = inboundIPRules; MinimumTlsVersionAllowed = minimumTlsVersionAllowed; @@ -85,6 +87,21 @@ internal EventGridTopicPatch(IDictionary tags, ManagedServiceIde /// Topic resource identity information. [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } + /// The Sku pricing tier for the topic. + internal ResourceSku Sku { get; set; } + /// The Sku name of the resource. The possible values are: Basic or Premium. + [WirePath("sku.name")] + public EventGridSku? SkuName + { + get => Sku is null ? default : Sku.Name; + set + { + if (Sku is null) + Sku = new ResourceSku(); + Sku.Name = value; + } + } + /// /// 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" /> @@ -97,7 +114,7 @@ internal EventGridTopicPatch(IDictionary tags, ManagedServiceIde /// Minimum TLS version of the publisher allowed to publish to this domain. [WirePath("properties.minimumTlsVersionAllowed")] public TlsVersion? MinimumTlsVersionAllowed { get; set; } - /// 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 Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the topic. [WirePath("properties.disableLocalAuth")] public bool? IsLocalAuthDisabled { get; set; } /// The data residency boundary for the topic. diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs index 2f41359ffd6c..fd3ef3124491 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs @@ -84,6 +84,7 @@ internal static EventSubscriptionDestination DeserializeEventSubscriptionDestina case "HybridConnection": return HybridConnectionEventSubscriptionDestination.DeserializeHybridConnectionEventSubscriptionDestination(element, options); case "MonitorAlert": return MonitorAlertEventSubscriptionDestination.DeserializeMonitorAlertEventSubscriptionDestination(element, options); case "NamespaceTopic": return NamespaceTopicEventSubscriptionDestination.DeserializeNamespaceTopicEventSubscriptionDestination(element, options); + case "PartnerDestination": return PartnerEventSubscriptionDestination.DeserializePartnerEventSubscriptionDestination(element, options); case "ServiceBusQueue": return ServiceBusQueueEventSubscriptionDestination.DeserializeServiceBusQueueEventSubscriptionDestination(element, options); case "ServiceBusTopic": return ServiceBusTopicEventSubscriptionDestination.DeserializeServiceBusTopicEventSubscriptionDestination(element, options); case "StorageQueue": return StorageQueueEventSubscriptionDestination.DeserializeStorageQueueEventSubscriptionDestination(element, options); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs index 22f4717033c7..cf4e5e9fbed0 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.EventGrid.Models /// /// Information about the destination for an event subscription. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , and . /// public abstract partial class EventSubscriptionDestination { diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs index 52f9d73cfa7c..fb58115a9acd 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs @@ -45,6 +45,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("userAssignedIdentity"u8); writer.WriteStringValue(UserAssignedIdentity); } + if (Optional.IsDefined(FederatedIdentityCredentialInfo)) + { + writer.WritePropertyName("federatedIdentityCredentialInfo"u8); + writer.WriteObjectValue(FederatedIdentityCredentialInfo, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -84,6 +89,7 @@ internal static EventSubscriptionIdentity DeserializeEventSubscriptionIdentity(J } EventSubscriptionIdentityType? type = default; string userAssignedIdentity = default; + FederatedIdentityCredentialInfo federatedIdentityCredentialInfo = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -102,13 +108,22 @@ internal static EventSubscriptionIdentity DeserializeEventSubscriptionIdentity(J userAssignedIdentity = property.Value.GetString(); continue; } + if (property.NameEquals("federatedIdentityCredentialInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + federatedIdentityCredentialInfo = FederatedIdentityCredentialInfo.DeserializeFederatedIdentityCredentialInfo(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new EventSubscriptionIdentity(type, userAssignedIdentity, serializedAdditionalRawData); + return new EventSubscriptionIdentity(type, userAssignedIdentity, federatedIdentityCredentialInfo, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -160,6 +175,24 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("FederatedClientId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" federatedIdentityCredentialInfo: "); + builder.AppendLine("{"); + builder.Append(" federatedClientId: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(FederatedIdentityCredentialInfo)) + { + builder.Append(" federatedIdentityCredentialInfo: "); + BicepSerializationHelpers.AppendChildObject(builder, FederatedIdentityCredentialInfo, options, 2, false, " federatedIdentityCredentialInfo: "); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.cs index 26b35d85af23..56ca719578a1 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.cs @@ -53,11 +53,13 @@ public EventSubscriptionIdentity() /// Initializes a new instance of . /// The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. /// The user identity associated with the resource. + /// The details of the Federated Identity Credential (FIC) used with the resource delivery. /// Keeps track of any properties unknown to the library. - internal EventSubscriptionIdentity(EventSubscriptionIdentityType? identityType, string userAssignedIdentity, IDictionary serializedAdditionalRawData) + internal EventSubscriptionIdentity(EventSubscriptionIdentityType? identityType, string userAssignedIdentity, FederatedIdentityCredentialInfo federatedIdentityCredentialInfo, IDictionary serializedAdditionalRawData) { IdentityType = identityType; UserAssignedIdentity = userAssignedIdentity; + FederatedIdentityCredentialInfo = federatedIdentityCredentialInfo; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -67,5 +69,17 @@ internal EventSubscriptionIdentity(EventSubscriptionIdentityType? identityType, /// The user identity associated with the resource. [WirePath("userAssignedIdentity")] public string UserAssignedIdentity { get; set; } + /// The details of the Federated Identity Credential (FIC) used with the resource delivery. + internal FederatedIdentityCredentialInfo FederatedIdentityCredentialInfo { get; set; } + /// The Multi-Tenant Microsoft Entra ID Application where the Federated Identity Credential (FIC) is associated with. + [WirePath("federatedIdentityCredentialInfo.federatedClientId")] + public Guid? FederatedClientId + { + get => FederatedIdentityCredentialInfo is null ? default(Guid?) : FederatedIdentityCredentialInfo.FederatedClientId; + set + { + FederatedIdentityCredentialInfo = value.HasValue ? new FederatedIdentityCredentialInfo(value.Value) : null; + } + } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FederatedIdentityCredentialInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FederatedIdentityCredentialInfo.Serialization.cs new file mode 100644 index 000000000000..2aee6c6e02bf --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FederatedIdentityCredentialInfo.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + internal partial class FederatedIdentityCredentialInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FederatedIdentityCredentialInfo)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("federatedClientId"u8); + writer.WriteStringValue(FederatedClientId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FederatedIdentityCredentialInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FederatedIdentityCredentialInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFederatedIdentityCredentialInfo(document.RootElement, options); + } + + internal static FederatedIdentityCredentialInfo DeserializeFederatedIdentityCredentialInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid federatedClientId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("federatedClientId"u8)) + { + federatedClientId = property.Value.GetGuid(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FederatedIdentityCredentialInfo(federatedClientId, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FederatedClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" federatedClientId: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" federatedClientId: "); + builder.AppendLine($"'{FederatedClientId.ToString()}'"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FederatedIdentityCredentialInfo)} does not support writing '{options.Format}' format."); + } + } + + FederatedIdentityCredentialInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFederatedIdentityCredentialInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FederatedIdentityCredentialInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FederatedIdentityCredentialInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FederatedIdentityCredentialInfo.cs new file mode 100644 index 000000000000..7c24915f7d68 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FederatedIdentityCredentialInfo.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// The details of the Federated Identity Credential (FIC) used with the resource. + internal partial class FederatedIdentityCredentialInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Multi-Tenant Microsoft Entra ID Application where the Federated Identity Credential (FIC) is associated with. + public FederatedIdentityCredentialInfo(Guid federatedClientId) + { + FederatedClientId = federatedClientId; + } + + /// Initializes a new instance of . + /// The Multi-Tenant Microsoft Entra ID Application where the Federated Identity Credential (FIC) is associated with. + /// Keeps track of any properties unknown to the library. + internal FederatedIdentityCredentialInfo(Guid federatedClientId, IDictionary serializedAdditionalRawData) + { + FederatedClientId = federatedClientId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FederatedIdentityCredentialInfo() + { + } + + /// The Multi-Tenant Microsoft Entra ID Application where the Federated Identity Credential (FIC) is associated with. + [WirePath("federatedClientId")] + public Guid FederatedClientId { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs new file mode 100644 index 000000000000..2d552f6b02e1 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class IssuerCertificateInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IssuerCertificateInfo)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("certificateUrl"u8); + writer.WriteStringValue(CertificateUri.AbsoluteUri); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + IssuerCertificateInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IssuerCertificateInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIssuerCertificateInfo(document.RootElement, options); + } + + internal static IssuerCertificateInfo DeserializeIssuerCertificateInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri certificateUri = default; + CustomJwtAuthenticationManagedIdentity identity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("certificateUrl"u8)) + { + certificateUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = CustomJwtAuthenticationManagedIdentity.DeserializeCustomJwtAuthenticationManagedIdentity(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IssuerCertificateInfo(certificateUri, identity, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificateUri)) + { + builder.Append(" certificateUrl: "); + builder.AppendLine($"'{CertificateUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(IssuerCertificateInfo)} does not support writing '{options.Format}' format."); + } + } + + IssuerCertificateInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeIssuerCertificateInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IssuerCertificateInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.cs new file mode 100644 index 000000000000..f57f365225f0 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Information about the certificate that is used for token validation. + public partial class IssuerCertificateInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Keyvault certificate URL in https://keyvaultname.vault.azure.net/certificates/certificateName/certificateVersion format. + /// is null. + public IssuerCertificateInfo(Uri certificateUri) + { + Argument.AssertNotNull(certificateUri, nameof(certificateUri)); + + CertificateUri = certificateUri; + } + + /// Initializes a new instance of . + /// Keyvault certificate URL in https://keyvaultname.vault.azure.net/certificates/certificateName/certificateVersion format. + /// The identity that will be used to access the certificate. + /// Keeps track of any properties unknown to the library. + internal IssuerCertificateInfo(Uri certificateUri, CustomJwtAuthenticationManagedIdentity identity, IDictionary serializedAdditionalRawData) + { + CertificateUri = certificateUri; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal IssuerCertificateInfo() + { + } + + /// Keyvault certificate URL in https://keyvaultname.vault.azure.net/certificates/certificateName/certificateVersion format. + [WirePath("certificateUrl")] + public Uri CertificateUri { get; set; } + /// The identity that will be used to access the certificate. + [WirePath("identity")] + public CustomJwtAuthenticationManagedIdentity Identity { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs index 98e0708def93..397649197158 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs @@ -56,6 +56,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("expirationTimeUtc"u8); writer.WriteStringValue(ExpireOn.Value, "O"); } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -98,6 +109,7 @@ internal static NamespaceTopicEventSubscriptionPatch DeserializeNamespaceTopicEv DeliverySchema? eventDeliverySchema = default; FiltersConfiguration filtersConfiguration = default; DateTimeOffset? expirationTimeUtc = default; + IDictionary tags = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -147,6 +159,20 @@ internal static NamespaceTopicEventSubscriptionPatch DeserializeNamespaceTopicEv expirationTimeUtc = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("tags"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + tags = dictionary; + continue; + } } continue; } @@ -156,7 +182,13 @@ internal static NamespaceTopicEventSubscriptionPatch DeserializeNamespaceTopicEv } } serializedAdditionalRawData = rawDataDictionary; - return new NamespaceTopicEventSubscriptionPatch(deliveryConfiguration, eventDeliverySchema, filtersConfiguration, expirationTimeUtc, serializedAdditionalRawData); + return new NamespaceTopicEventSubscriptionPatch( + deliveryConfiguration, + eventDeliverySchema, + filtersConfiguration, + expirationTimeUtc, + tags ?? new ChangeTrackingDictionary(), + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.cs index 8edebca87990..d32e1815f8c8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.cs @@ -48,6 +48,7 @@ public partial class NamespaceTopicEventSubscriptionPatch /// Initializes a new instance of . public NamespaceTopicEventSubscriptionPatch() { + Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -55,13 +56,15 @@ public NamespaceTopicEventSubscriptionPatch() /// The event delivery schema for the event subscription. /// Information about the filter for the event subscription. /// Expiration time of the event subscription. + /// Tags relating to Event Subscription resource. /// Keeps track of any properties unknown to the library. - internal NamespaceTopicEventSubscriptionPatch(DeliveryConfiguration deliveryConfiguration, DeliverySchema? eventDeliverySchema, FiltersConfiguration filtersConfiguration, DateTimeOffset? expireOn, IDictionary serializedAdditionalRawData) + internal NamespaceTopicEventSubscriptionPatch(DeliveryConfiguration deliveryConfiguration, DeliverySchema? eventDeliverySchema, FiltersConfiguration filtersConfiguration, DateTimeOffset? expireOn, IDictionary tags, IDictionary serializedAdditionalRawData) { DeliveryConfiguration = deliveryConfiguration; EventDeliverySchema = eventDeliverySchema; FiltersConfiguration = filtersConfiguration; ExpireOn = expireOn; + Tags = tags; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -77,5 +80,8 @@ internal NamespaceTopicEventSubscriptionPatch(DeliveryConfiguration deliveryConf /// Expiration time of the event subscription. [WirePath("properties.expirationTimeUtc")] public DateTimeOffset? ExpireOn { get; set; } + /// Tags relating to Event Subscription resource. + [WirePath("properties.tags")] + public IDictionary Tags { get; } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterAssociationAccessMode.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterAssociationAccessMode.cs new file mode 100644 index 000000000000..4cbabb852478 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterAssociationAccessMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Network security perimeter access mode. + public readonly partial struct NetworkSecurityPerimeterAssociationAccessMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkSecurityPerimeterAssociationAccessMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LearningValue = "Learning"; + private const string EnforcedValue = "Enforced"; + private const string AuditValue = "Audit"; + + /// Learning. + public static NetworkSecurityPerimeterAssociationAccessMode Learning { get; } = new NetworkSecurityPerimeterAssociationAccessMode(LearningValue); + /// Enforced. + public static NetworkSecurityPerimeterAssociationAccessMode Enforced { get; } = new NetworkSecurityPerimeterAssociationAccessMode(EnforcedValue); + /// Audit. + public static NetworkSecurityPerimeterAssociationAccessMode Audit { get; } = new NetworkSecurityPerimeterAssociationAccessMode(AuditValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkSecurityPerimeterAssociationAccessMode left, NetworkSecurityPerimeterAssociationAccessMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkSecurityPerimeterAssociationAccessMode left, NetworkSecurityPerimeterAssociationAccessMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NetworkSecurityPerimeterAssociationAccessMode(string value) => new NetworkSecurityPerimeterAssociationAccessMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkSecurityPerimeterAssociationAccessMode other && Equals(other); + /// + public bool Equals(NetworkSecurityPerimeterAssociationAccessMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigProvisioningState.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigProvisioningState.cs new file mode 100644 index 000000000000..efe1952dd88b --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigProvisioningState.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Provisioning state to reflect configuration state and indicate status of nsp profile configuration retrieval. + public readonly partial struct NetworkSecurityPerimeterConfigProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkSecurityPerimeterConfigProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string SucceededValue = "Succeeded"; + private const string CanceledValue = "Canceled"; + private const string FailedValue = "Failed"; + private const string DeletedValue = "Deleted"; + private const string AcceptedValue = "Accepted"; + + /// Creating. + public static NetworkSecurityPerimeterConfigProvisioningState Creating { get; } = new NetworkSecurityPerimeterConfigProvisioningState(CreatingValue); + /// Updating. + public static NetworkSecurityPerimeterConfigProvisioningState Updating { get; } = new NetworkSecurityPerimeterConfigProvisioningState(UpdatingValue); + /// Deleting. + public static NetworkSecurityPerimeterConfigProvisioningState Deleting { get; } = new NetworkSecurityPerimeterConfigProvisioningState(DeletingValue); + /// Succeeded. + public static NetworkSecurityPerimeterConfigProvisioningState Succeeded { get; } = new NetworkSecurityPerimeterConfigProvisioningState(SucceededValue); + /// Canceled. + public static NetworkSecurityPerimeterConfigProvisioningState Canceled { get; } = new NetworkSecurityPerimeterConfigProvisioningState(CanceledValue); + /// Failed. + public static NetworkSecurityPerimeterConfigProvisioningState Failed { get; } = new NetworkSecurityPerimeterConfigProvisioningState(FailedValue); + /// Deleted. + public static NetworkSecurityPerimeterConfigProvisioningState Deleted { get; } = new NetworkSecurityPerimeterConfigProvisioningState(DeletedValue); + /// Accepted. + public static NetworkSecurityPerimeterConfigProvisioningState Accepted { get; } = new NetworkSecurityPerimeterConfigProvisioningState(AcceptedValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkSecurityPerimeterConfigProvisioningState left, NetworkSecurityPerimeterConfigProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkSecurityPerimeterConfigProvisioningState left, NetworkSecurityPerimeterConfigProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NetworkSecurityPerimeterConfigProvisioningState(string value) => new NetworkSecurityPerimeterConfigProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkSecurityPerimeterConfigProvisioningState other && Equals(other); + /// + public bool Equals(NetworkSecurityPerimeterConfigProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssueSeverity.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssueSeverity.cs new file mode 100644 index 000000000000..361f2d43fcb2 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssueSeverity.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Provisioning issue severity. + public readonly partial struct NetworkSecurityPerimeterConfigurationIssueSeverity : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkSecurityPerimeterConfigurationIssueSeverity(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string WarningValue = "Warning"; + private const string ErrorValue = "Error"; + + /// Warning. + public static NetworkSecurityPerimeterConfigurationIssueSeverity Warning { get; } = new NetworkSecurityPerimeterConfigurationIssueSeverity(WarningValue); + /// Error. + public static NetworkSecurityPerimeterConfigurationIssueSeverity Error { get; } = new NetworkSecurityPerimeterConfigurationIssueSeverity(ErrorValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkSecurityPerimeterConfigurationIssueSeverity left, NetworkSecurityPerimeterConfigurationIssueSeverity right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkSecurityPerimeterConfigurationIssueSeverity left, NetworkSecurityPerimeterConfigurationIssueSeverity right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NetworkSecurityPerimeterConfigurationIssueSeverity(string value) => new NetworkSecurityPerimeterConfigurationIssueSeverity(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkSecurityPerimeterConfigurationIssueSeverity other && Equals(other); + /// + public bool Equals(NetworkSecurityPerimeterConfigurationIssueSeverity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssueType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssueType.cs new file mode 100644 index 000000000000..f2069f8d38f9 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssueType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Provisioning issue type. + public readonly partial struct NetworkSecurityPerimeterConfigurationIssueType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkSecurityPerimeterConfigurationIssueType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MissingPerimeterConfigurationValue = "MissingPerimeterConfiguration"; + private const string MissingIdentityConfigurationValue = "MissingIdentityConfiguration"; + private const string ConfigurationPropagationFailureValue = "ConfigurationPropagationFailure"; + private const string OtherValue = "Other"; + + /// MissingPerimeterConfiguration. + public static NetworkSecurityPerimeterConfigurationIssueType MissingPerimeterConfiguration { get; } = new NetworkSecurityPerimeterConfigurationIssueType(MissingPerimeterConfigurationValue); + /// MissingIdentityConfiguration. + public static NetworkSecurityPerimeterConfigurationIssueType MissingIdentityConfiguration { get; } = new NetworkSecurityPerimeterConfigurationIssueType(MissingIdentityConfigurationValue); + /// ConfigurationPropagationFailure. + public static NetworkSecurityPerimeterConfigurationIssueType ConfigurationPropagationFailure { get; } = new NetworkSecurityPerimeterConfigurationIssueType(ConfigurationPropagationFailureValue); + /// Other. + public static NetworkSecurityPerimeterConfigurationIssueType Other { get; } = new NetworkSecurityPerimeterConfigurationIssueType(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkSecurityPerimeterConfigurationIssueType left, NetworkSecurityPerimeterConfigurationIssueType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkSecurityPerimeterConfigurationIssueType left, NetworkSecurityPerimeterConfigurationIssueType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NetworkSecurityPerimeterConfigurationIssueType(string value) => new NetworkSecurityPerimeterConfigurationIssueType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkSecurityPerimeterConfigurationIssueType other && Equals(other); + /// + public bool Equals(NetworkSecurityPerimeterConfigurationIssueType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs new file mode 100644 index 000000000000..7982fc514734 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs @@ -0,0 +1,412 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class NetworkSecurityPerimeterConfigurationIssues : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationIssues)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(IssueType)) + { + writer.WritePropertyName("issueType"u8); + writer.WriteStringValue(IssueType.Value.ToString()); + } + if (Optional.IsDefined(Severity)) + { + writer.WritePropertyName("severity"u8); + writer.WriteStringValue(Severity.Value.ToString()); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(SuggestedResourceIds)) + { + writer.WritePropertyName("suggestedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in SuggestedResourceIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SuggestedAccessRules)) + { + writer.WritePropertyName("suggestedAccessRules"u8); + writer.WriteStartArray(); + foreach (var item in SuggestedAccessRules) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkSecurityPerimeterConfigurationIssues IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationIssues)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeterConfigurationIssues(document.RootElement, options); + } + + internal static NetworkSecurityPerimeterConfigurationIssues DeserializeNetworkSecurityPerimeterConfigurationIssues(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + NetworkSecurityPerimeterConfigurationIssueType? issueType = default; + NetworkSecurityPerimeterConfigurationIssueSeverity? severity = default; + string description = default; + IList suggestedResourceIds = default; + IList suggestedAccessRules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("issueType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + issueType = new NetworkSecurityPerimeterConfigurationIssueType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("severity"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + severity = new NetworkSecurityPerimeterConfigurationIssueSeverity(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("suggestedResourceIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + suggestedResourceIds = array; + continue; + } + if (property0.NameEquals("suggestedAccessRules"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + suggestedAccessRules = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeterConfigurationIssues( + name, + issueType, + severity, + description, + suggestedResourceIds ?? new ChangeTrackingList(), + suggestedAccessRules ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IssueType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" issueType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IssueType)) + { + builder.Append(" issueType: "); + builder.AppendLine($"'{IssueType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Severity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" severity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Severity)) + { + builder.Append(" severity: "); + builder.AppendLine($"'{Severity.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SuggestedResourceIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" suggestedResourceIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(SuggestedResourceIds)) + { + if (SuggestedResourceIds.Any()) + { + builder.Append(" suggestedResourceIds: "); + builder.AppendLine("["); + foreach (var item in SuggestedResourceIds) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SuggestedAccessRules), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" suggestedAccessRules: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(SuggestedAccessRules)) + { + if (SuggestedAccessRules.Any()) + { + builder.Append(" suggestedAccessRules: "); + builder.AppendLine("["); + foreach (var item in SuggestedAccessRules) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationIssues)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeterConfigurationIssues IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetworkSecurityPerimeterConfigurationIssues(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationIssues)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.cs new file mode 100644 index 000000000000..a8f308bda3ba --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Network security perimeter configuration issues. + public partial class NetworkSecurityPerimeterConfigurationIssues + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkSecurityPerimeterConfigurationIssues() + { + SuggestedResourceIds = new ChangeTrackingList(); + SuggestedAccessRules = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Provisioning issue name. + /// Provisioning issue type. + /// Provisioning issue severity. + /// Provisioning issue description. + /// ARM IDs of resources that can be associated to the same perimeter to remediate the issue. + /// Access rules that can be added to the same profile to remediate the issue. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterConfigurationIssues(string name, NetworkSecurityPerimeterConfigurationIssueType? issueType, NetworkSecurityPerimeterConfigurationIssueSeverity? severity, string description, IList suggestedResourceIds, IList suggestedAccessRules, IDictionary serializedAdditionalRawData) + { + Name = name; + IssueType = issueType; + Severity = severity; + Description = description; + SuggestedResourceIds = suggestedResourceIds; + SuggestedAccessRules = suggestedAccessRules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Provisioning issue name. + [WirePath("name")] + public string Name { get; set; } + /// Provisioning issue type. + [WirePath("properties.issueType")] + public NetworkSecurityPerimeterConfigurationIssueType? IssueType { get; set; } + /// Provisioning issue severity. + [WirePath("properties.severity")] + public NetworkSecurityPerimeterConfigurationIssueSeverity? Severity { get; set; } + /// Provisioning issue description. + [WirePath("properties.description")] + public string Description { get; set; } + /// ARM IDs of resources that can be associated to the same perimeter to remediate the issue. + [WirePath("properties.suggestedResourceIds")] + public IList SuggestedResourceIds { get; } + /// Access rules that can be added to the same profile to remediate the issue. + [WirePath("properties.suggestedAccessRules")] + public IList SuggestedAccessRules { get; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs new file mode 100644 index 000000000000..53b024257374 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + internal partial class NetworkSecurityPerimeterConfigurationList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationList)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkSecurityPerimeterConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeterConfigurationList(document.RootElement, options); + } + + internal static NetworkSecurityPerimeterConfigurationList DeserializeNetworkSecurityPerimeterConfigurationList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeterConfigurationList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationList)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeterConfigurationList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetworkSecurityPerimeterConfigurationList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.cs new file mode 100644 index 000000000000..f354ce669891 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Network security perimeter configuration List. + internal partial class NetworkSecurityPerimeterConfigurationList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NetworkSecurityPerimeterConfigurationList() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of all network security parameter configurations. + /// A link for the next page of Network Security Perimeter Configuration. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterConfigurationList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of all network security parameter configurations. + public IReadOnlyList Value { get; } + /// A link for the next page of Network Security Perimeter Configuration. + public string NextLink { get; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs new file mode 100644 index 000000000000..e0c7c0312d25 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class NetworkSecurityPerimeterConfigurationProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationProfile)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(AccessRulesVersion)) + { + writer.WritePropertyName("accessRulesVersion"u8); + writer.WriteStringValue(AccessRulesVersion); + } + if (Optional.IsCollectionDefined(AccessRules)) + { + writer.WritePropertyName("accessRules"u8); + writer.WriteStartArray(); + foreach (var item in AccessRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DiagnosticSettingsVersion)) + { + writer.WritePropertyName("diagnosticSettingsVersion"u8); + writer.WriteStringValue(DiagnosticSettingsVersion); + } + if (Optional.IsCollectionDefined(EnabledLogCategories)) + { + writer.WritePropertyName("enabledLogCategories"u8); + writer.WriteStartArray(); + foreach (var item in EnabledLogCategories) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkSecurityPerimeterConfigurationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeterConfigurationProfile(document.RootElement, options); + } + + internal static NetworkSecurityPerimeterConfigurationProfile DeserializeNetworkSecurityPerimeterConfigurationProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string accessRulesVersion = default; + IList accessRules = default; + string diagnosticSettingsVersion = default; + IList enabledLogCategories = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessRulesVersion"u8)) + { + accessRulesVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkSecurityPerimeterProfileAccessRule.DeserializeNetworkSecurityPerimeterProfileAccessRule(item, options)); + } + accessRules = array; + continue; + } + if (property.NameEquals("diagnosticSettingsVersion"u8)) + { + diagnosticSettingsVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("enabledLogCategories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + enabledLogCategories = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeterConfigurationProfile( + name, + accessRulesVersion, + accessRules ?? new ChangeTrackingList(), + diagnosticSettingsVersion, + enabledLogCategories ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessRulesVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessRulesVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessRulesVersion)) + { + builder.Append(" accessRulesVersion: "); + if (AccessRulesVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccessRulesVersion}'''"); + } + else + { + builder.AppendLine($"'{AccessRulesVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessRules), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessRules: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AccessRules)) + { + if (AccessRules.Any()) + { + builder.Append(" accessRules: "); + builder.AppendLine("["); + foreach (var item in AccessRules) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " accessRules: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DiagnosticSettingsVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" diagnosticSettingsVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DiagnosticSettingsVersion)) + { + builder.Append(" diagnosticSettingsVersion: "); + if (DiagnosticSettingsVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DiagnosticSettingsVersion}'''"); + } + else + { + builder.AppendLine($"'{DiagnosticSettingsVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnabledLogCategories), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabledLogCategories: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EnabledLogCategories)) + { + if (EnabledLogCategories.Any()) + { + builder.Append(" enabledLogCategories: "); + builder.AppendLine("["); + foreach (var item in EnabledLogCategories) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationProfile)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeterConfigurationProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetworkSecurityPerimeterConfigurationProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.cs new file mode 100644 index 000000000000..9843f3c57b1a --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Nsp configuration with profile information. + public partial class NetworkSecurityPerimeterConfigurationProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkSecurityPerimeterConfigurationProfile() + { + AccessRules = new ChangeTrackingList(); + EnabledLogCategories = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Nsp configuration profile name. + /// Access rules version number for nsp profile. + /// List of inbound or outbound access rule setup on the nsp profile. + /// Diagnostic settings version number for nsp profile. + /// Enabled log categories for nsp profile. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterConfigurationProfile(string name, string accessRulesVersion, IList accessRules, string diagnosticSettingsVersion, IList enabledLogCategories, IDictionary serializedAdditionalRawData) + { + Name = name; + AccessRulesVersion = accessRulesVersion; + AccessRules = accessRules; + DiagnosticSettingsVersion = diagnosticSettingsVersion; + EnabledLogCategories = enabledLogCategories; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Nsp configuration profile name. + [WirePath("name")] + public string Name { get; set; } + /// Access rules version number for nsp profile. + [WirePath("accessRulesVersion")] + public string AccessRulesVersion { get; set; } + /// List of inbound or outbound access rule setup on the nsp profile. + [WirePath("accessRules")] + public IList AccessRules { get; } + /// Diagnostic settings version number for nsp profile. + [WirePath("diagnosticSettingsVersion")] + public string DiagnosticSettingsVersion { get; set; } + /// Enabled log categories for nsp profile. + [WirePath("enabledLogCategories")] + public IList EnabledLogCategories { get; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs new file mode 100644 index 000000000000..fcda1b14a04f --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class NetworkSecurityPerimeterInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterInfo)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(PerimeterGuid)) + { + writer.WritePropertyName("perimeterGuid"u8); + writer.WriteStringValue(PerimeterGuid); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkSecurityPerimeterInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeterInfo(document.RootElement, options); + } + + internal static NetworkSecurityPerimeterInfo DeserializeNetworkSecurityPerimeterInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string perimeterGuid = default; + AzureLocation? location = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("perimeterGuid"u8)) + { + perimeterGuid = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeterInfo(id, perimeterGuid, location, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PerimeterGuid), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" perimeterGuid: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PerimeterGuid)) + { + builder.Append(" perimeterGuid: "); + if (PerimeterGuid.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PerimeterGuid}'''"); + } + else + { + builder.AppendLine($"'{PerimeterGuid}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterInfo)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeterInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetworkSecurityPerimeterInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.cs new file mode 100644 index 000000000000..8a8c55f4118a --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Network security perimeter info. + public partial class NetworkSecurityPerimeterInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkSecurityPerimeterInfo() + { + } + + /// Initializes a new instance of . + /// Arm id for network security perimeter. + /// Network security perimeter guid. + /// Network security perimeter location. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterInfo(string id, string perimeterGuid, AzureLocation? location, IDictionary serializedAdditionalRawData) + { + Id = id; + PerimeterGuid = perimeterGuid; + Location = location; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Arm id for network security perimeter. + [WirePath("id")] + public string Id { get; set; } + /// Network security perimeter guid. + [WirePath("perimeterGuid")] + public string PerimeterGuid { get; set; } + /// Network security perimeter location. + [WirePath("location")] + public AzureLocation? Location { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs new file mode 100644 index 000000000000..5e54e30fd6ce --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs @@ -0,0 +1,639 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class NetworkSecurityPerimeterProfileAccessRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterProfileAccessRule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(FullyQualifiedArmId)) + { + writer.WritePropertyName("fullyQualifiedArmId"u8); + writer.WriteStringValue(FullyQualifiedArmId); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(NetworkSecurityPerimeterProfileAccessRuleType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(NetworkSecurityPerimeterProfileAccessRuleType); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Direction)) + { + writer.WritePropertyName("direction"u8); + writer.WriteStringValue(Direction.Value.ToString()); + } + if (Optional.IsCollectionDefined(AddressPrefixes)) + { + writer.WritePropertyName("addressPrefixes"u8); + writer.WriteStartArray(); + foreach (var item in AddressPrefixes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Subscriptions)) + { + writer.WritePropertyName("subscriptions"u8); + writer.WriteStartArray(); + foreach (var item in Subscriptions) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(NetworkSecurityPerimeters)) + { + writer.WritePropertyName("networkSecurityPerimeters"u8); + writer.WriteStartArray(); + foreach (var item in NetworkSecurityPerimeters) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(FullyQualifiedDomainNames)) + { + writer.WritePropertyName("fullyQualifiedDomainNames"u8); + writer.WriteStartArray(); + foreach (var item in FullyQualifiedDomainNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EmailAddresses)) + { + writer.WritePropertyName("emailAddresses"u8); + writer.WriteStartArray(); + foreach (var item in EmailAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(PhoneNumbers)) + { + writer.WritePropertyName("phoneNumbers"u8); + writer.WriteStartArray(); + foreach (var item in PhoneNumbers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkSecurityPerimeterProfileAccessRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterProfileAccessRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeterProfileAccessRule(document.RootElement, options); + } + + internal static NetworkSecurityPerimeterProfileAccessRule DeserializeNetworkSecurityPerimeterProfileAccessRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fullyQualifiedArmId = default; + string name = default; + string type = default; + NetworkSecurityPerimeterProfileAccessRuleDirection? direction = default; + IList addressPrefixes = default; + IList subscriptions = default; + IList networkSecurityPerimeters = default; + IList fullyQualifiedDomainNames = default; + IList emailAddresses = default; + IList phoneNumbers = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fullyQualifiedArmId"u8)) + { + fullyQualifiedArmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("direction"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + direction = new NetworkSecurityPerimeterProfileAccessRuleDirection(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("addressPrefixes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + addressPrefixes = array; + continue; + } + if (property0.NameEquals("subscriptions"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + subscriptions = array; + continue; + } + if (property0.NameEquals("networkSecurityPerimeters"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(NetworkSecurityPerimeterInfo.DeserializeNetworkSecurityPerimeterInfo(item, options)); + } + networkSecurityPerimeters = array; + continue; + } + if (property0.NameEquals("fullyQualifiedDomainNames"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + fullyQualifiedDomainNames = array; + continue; + } + if (property0.NameEquals("emailAddresses"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + emailAddresses = array; + continue; + } + if (property0.NameEquals("phoneNumbers"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + phoneNumbers = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeterProfileAccessRule( + fullyQualifiedArmId, + name, + type, + direction, + addressPrefixes ?? new ChangeTrackingList(), + subscriptions ?? new ChangeTrackingList(), + networkSecurityPerimeters ?? new ChangeTrackingList(), + fullyQualifiedDomainNames ?? new ChangeTrackingList(), + emailAddresses ?? new ChangeTrackingList(), + phoneNumbers ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FullyQualifiedArmId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" fullyQualifiedArmId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FullyQualifiedArmId)) + { + builder.Append(" fullyQualifiedArmId: "); + if (FullyQualifiedArmId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{FullyQualifiedArmId}'''"); + } + else + { + builder.AppendLine($"'{FullyQualifiedArmId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkSecurityPerimeterProfileAccessRuleType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkSecurityPerimeterProfileAccessRuleType)) + { + builder.Append(" type: "); + if (NetworkSecurityPerimeterProfileAccessRuleType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NetworkSecurityPerimeterProfileAccessRuleType}'''"); + } + else + { + builder.AppendLine($"'{NetworkSecurityPerimeterProfileAccessRuleType}'"); + } + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Direction), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" direction: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Direction)) + { + builder.Append(" direction: "); + builder.AppendLine($"'{Direction.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AddressPrefixes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" addressPrefixes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AddressPrefixes)) + { + if (AddressPrefixes.Any()) + { + builder.Append(" addressPrefixes: "); + builder.AppendLine("["); + foreach (var item in AddressPrefixes) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subscriptions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Subscriptions)) + { + if (Subscriptions.Any()) + { + builder.Append(" subscriptions: "); + builder.AppendLine("["); + foreach (var item in Subscriptions) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " subscriptions: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkSecurityPerimeters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkSecurityPerimeters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(NetworkSecurityPerimeters)) + { + if (NetworkSecurityPerimeters.Any()) + { + builder.Append(" networkSecurityPerimeters: "); + builder.AppendLine("["); + foreach (var item in NetworkSecurityPerimeters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " networkSecurityPerimeters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FullyQualifiedDomainNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" fullyQualifiedDomainNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(FullyQualifiedDomainNames)) + { + if (FullyQualifiedDomainNames.Any()) + { + builder.Append(" fullyQualifiedDomainNames: "); + builder.AppendLine("["); + foreach (var item in FullyQualifiedDomainNames) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EmailAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" emailAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EmailAddresses)) + { + if (EmailAddresses.Any()) + { + builder.Append(" emailAddresses: "); + builder.AppendLine("["); + foreach (var item in EmailAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PhoneNumbers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" phoneNumbers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PhoneNumbers)) + { + if (PhoneNumbers.Any()) + { + builder.Append(" phoneNumbers: "); + builder.AppendLine("["); + foreach (var item in PhoneNumbers) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterProfileAccessRule)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeterProfileAccessRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetworkSecurityPerimeterProfileAccessRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterProfileAccessRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.cs new file mode 100644 index 000000000000..b58c3326db8a --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Network security perimeter profile access rule. + public partial class NetworkSecurityPerimeterProfileAccessRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkSecurityPerimeterProfileAccessRule() + { + AddressPrefixes = new ChangeTrackingList(); + Subscriptions = new ChangeTrackingList(); + NetworkSecurityPerimeters = new ChangeTrackingList(); + FullyQualifiedDomainNames = new ChangeTrackingList(); + EmailAddresses = new ChangeTrackingList(); + PhoneNumbers = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Fully Qualified Arm id for network security perimeter profile access rule. + /// Name for nsp access rule. + /// nsp access rule type. + /// NSP access rule direction. + /// Address prefixes. + /// List of subscriptions. + /// Network security perimeters. + /// Fully qualified domain names. + /// List of email addresses. + /// List of phone numbers. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterProfileAccessRule(string fullyQualifiedArmId, string name, string networkSecurityPerimeterProfileAccessRuleType, NetworkSecurityPerimeterProfileAccessRuleDirection? direction, IList addressPrefixes, IList subscriptions, IList networkSecurityPerimeters, IList fullyQualifiedDomainNames, IList emailAddresses, IList phoneNumbers, IDictionary serializedAdditionalRawData) + { + FullyQualifiedArmId = fullyQualifiedArmId; + Name = name; + NetworkSecurityPerimeterProfileAccessRuleType = networkSecurityPerimeterProfileAccessRuleType; + Direction = direction; + AddressPrefixes = addressPrefixes; + Subscriptions = subscriptions; + NetworkSecurityPerimeters = networkSecurityPerimeters; + FullyQualifiedDomainNames = fullyQualifiedDomainNames; + EmailAddresses = emailAddresses; + PhoneNumbers = phoneNumbers; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Fully Qualified Arm id for network security perimeter profile access rule. + [WirePath("fullyQualifiedArmId")] + public string FullyQualifiedArmId { get; set; } + /// Name for nsp access rule. + [WirePath("name")] + public string Name { get; set; } + /// nsp access rule type. + [WirePath("type")] + public string NetworkSecurityPerimeterProfileAccessRuleType { get; set; } + /// NSP access rule direction. + [WirePath("properties.direction")] + public NetworkSecurityPerimeterProfileAccessRuleDirection? Direction { get; set; } + /// Address prefixes. + [WirePath("properties.addressPrefixes")] + public IList AddressPrefixes { get; } + /// List of subscriptions. + [WirePath("properties.subscriptions")] + public IList Subscriptions { get; } + /// Network security perimeters. + [WirePath("properties.networkSecurityPerimeters")] + public IList NetworkSecurityPerimeters { get; } + /// Fully qualified domain names. + [WirePath("properties.fullyQualifiedDomainNames")] + public IList FullyQualifiedDomainNames { get; } + /// List of email addresses. + [WirePath("properties.emailAddresses")] + public IList EmailAddresses { get; } + /// List of phone numbers. + [WirePath("properties.phoneNumbers")] + public IList PhoneNumbers { get; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRuleDirection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRuleDirection.cs new file mode 100644 index 000000000000..69026b1fbf93 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRuleDirection.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// NSP access rule direction. + public readonly partial struct NetworkSecurityPerimeterProfileAccessRuleDirection : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkSecurityPerimeterProfileAccessRuleDirection(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InboundValue = "Inbound"; + private const string OutboundValue = "Outbound"; + + /// Inbound. + public static NetworkSecurityPerimeterProfileAccessRuleDirection Inbound { get; } = new NetworkSecurityPerimeterProfileAccessRuleDirection(InboundValue); + /// Outbound. + public static NetworkSecurityPerimeterProfileAccessRuleDirection Outbound { get; } = new NetworkSecurityPerimeterProfileAccessRuleDirection(OutboundValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkSecurityPerimeterProfileAccessRuleDirection left, NetworkSecurityPerimeterProfileAccessRuleDirection right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkSecurityPerimeterProfileAccessRuleDirection left, NetworkSecurityPerimeterProfileAccessRuleDirection right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NetworkSecurityPerimeterProfileAccessRuleDirection(string value) => new NetworkSecurityPerimeterProfileAccessRuleDirection(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkSecurityPerimeterProfileAccessRuleDirection other && Equals(other); + /// + public bool Equals(NetworkSecurityPerimeterProfileAccessRuleDirection other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterResourceType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterResourceType.cs new file mode 100644 index 000000000000..b19be5e88b94 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterResourceType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// The NetworkSecurityPerimeterResourceType. + internal readonly partial struct NetworkSecurityPerimeterResourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkSecurityPerimeterResourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TopicsValue = "topics"; + private const string DomainsValue = "domains"; + + /// topics. + public static NetworkSecurityPerimeterResourceType Topics { get; } = new NetworkSecurityPerimeterResourceType(TopicsValue); + /// domains. + public static NetworkSecurityPerimeterResourceType Domains { get; } = new NetworkSecurityPerimeterResourceType(DomainsValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkSecurityPerimeterResourceType left, NetworkSecurityPerimeterResourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkSecurityPerimeterResourceType left, NetworkSecurityPerimeterResourceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NetworkSecurityPerimeterResourceType(string value) => new NetworkSecurityPerimeterResourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkSecurityPerimeterResourceType other && Equals(other); + /// + public bool Equals(NetworkSecurityPerimeterResourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs new file mode 100644 index 000000000000..6b2fc6572d11 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + [PersistableModelProxy(typeof(UnknownPartnerClientAuthentication))] + public partial class PartnerClientAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("clientAuthenticationType"u8); + writer.WriteStringValue(ClientAuthenticationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PartnerClientAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerClientAuthentication(document.RootElement, options); + } + + internal static PartnerClientAuthentication DeserializePartnerClientAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("clientAuthenticationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureAD": return AzureADPartnerClientAuthentication.DeserializeAzureADPartnerClientAuthentication(element, options); + } + } + return UnknownPartnerClientAuthentication.DeserializeUnknownPartnerClientAuthentication(element, options); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientAuthenticationType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientAuthenticationType: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" clientAuthenticationType: "); + builder.AppendLine($"'{ClientAuthenticationType.ToString()}'"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support writing '{options.Format}' format."); + } + } + + PartnerClientAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerClientAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs new file mode 100644 index 000000000000..86a1ad80f4ac --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// + /// Partner client authentication + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class PartnerClientAuthentication + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected PartnerClientAuthentication() + { + } + + /// Initializes a new instance of . + /// Type of client authentication. + /// Keeps track of any properties unknown to the library. + internal PartnerClientAuthentication(PartnerClientAuthenticationType clientAuthenticationType, IDictionary serializedAdditionalRawData) + { + ClientAuthenticationType = clientAuthenticationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of client authentication. + internal PartnerClientAuthenticationType ClientAuthenticationType { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthenticationType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthenticationType.cs new file mode 100644 index 000000000000..bca6409d58f2 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthenticationType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Type of client authentication. + internal readonly partial struct PartnerClientAuthenticationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PartnerClientAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureADValue = "AzureAD"; + + /// AzureAD. + public static PartnerClientAuthenticationType AzureAD { get; } = new PartnerClientAuthenticationType(AzureADValue); + /// Determines if two values are the same. + public static bool operator ==(PartnerClientAuthenticationType left, PartnerClientAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PartnerClientAuthenticationType left, PartnerClientAuthenticationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PartnerClientAuthenticationType(string value) => new PartnerClientAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PartnerClientAuthenticationType other && Equals(other); + /// + public bool Equals(PartnerClientAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationActivationState.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationActivationState.cs new file mode 100644 index 000000000000..78a0d224b05f --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationActivationState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Activation state of the partner destination. + public readonly partial struct PartnerDestinationActivationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PartnerDestinationActivationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NeverActivatedValue = "NeverActivated"; + private const string ActivatedValue = "Activated"; + + /// NeverActivated. + public static PartnerDestinationActivationState NeverActivated { get; } = new PartnerDestinationActivationState(NeverActivatedValue); + /// Activated. + public static PartnerDestinationActivationState Activated { get; } = new PartnerDestinationActivationState(ActivatedValue); + /// Determines if two values are the same. + public static bool operator ==(PartnerDestinationActivationState left, PartnerDestinationActivationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PartnerDestinationActivationState left, PartnerDestinationActivationState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PartnerDestinationActivationState(string value) => new PartnerDestinationActivationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PartnerDestinationActivationState other && Equals(other); + /// + public bool Equals(PartnerDestinationActivationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs new file mode 100644 index 000000000000..80772853cc3f --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + [PersistableModelProxy(typeof(UnknownPartnerDestinationInfo))] + public partial class PartnerDestinationInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AzureSubscriptionId)) + { + writer.WritePropertyName("azureSubscriptionId"u8); + writer.WriteStringValue(AzureSubscriptionId); + } + if (Optional.IsDefined(ResourceGroupName)) + { + writer.WritePropertyName("resourceGroupName"u8); + writer.WriteStringValue(ResourceGroupName); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("endpointType"u8); + writer.WriteStringValue(EndpointType.ToString()); + if (Optional.IsDefined(EndpointServiceContext)) + { + writer.WritePropertyName("endpointServiceContext"u8); + writer.WriteStringValue(EndpointServiceContext); + } + if (Optional.IsCollectionDefined(ResourceMoveChangeHistory)) + { + writer.WritePropertyName("resourceMoveChangeHistory"u8); + writer.WriteStartArray(); + foreach (var item in ResourceMoveChangeHistory) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerDestinationInfo(document.RootElement, options); + } + + internal static PartnerDestinationInfo DeserializePartnerDestinationInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("endpointType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "WebHook": return WebhookPartnerDestinationInfo.DeserializeWebhookPartnerDestinationInfo(element, options); + } + } + return UnknownPartnerDestinationInfo.DeserializeUnknownPartnerDestinationInfo(element, options); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureSubscriptionId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureSubscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AzureSubscriptionId)) + { + builder.Append(" azureSubscriptionId: "); + if (AzureSubscriptionId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AzureSubscriptionId}'''"); + } + else + { + builder.AppendLine($"'{AzureSubscriptionId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceGroupName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceGroupName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceGroupName)) + { + builder.Append(" resourceGroupName: "); + if (ResourceGroupName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceGroupName}'''"); + } + else + { + builder.AppendLine($"'{ResourceGroupName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointType: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" endpointType: "); + builder.AppendLine($"'{EndpointType.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointServiceContext), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointServiceContext: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointServiceContext)) + { + builder.Append(" endpointServiceContext: "); + if (EndpointServiceContext.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EndpointServiceContext}'''"); + } + else + { + builder.AppendLine($"'{EndpointServiceContext}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceMoveChangeHistory), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceMoveChangeHistory: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ResourceMoveChangeHistory)) + { + if (ResourceMoveChangeHistory.Any()) + { + builder.Append(" resourceMoveChangeHistory: "); + builder.AppendLine("["); + foreach (var item in ResourceMoveChangeHistory) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " resourceMoveChangeHistory: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support writing '{options.Format}' format."); + } + } + + PartnerDestinationInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerDestinationInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.cs new file mode 100644 index 000000000000..b51a254265bc --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// + /// Properties of the corresponding partner destination of a Channel. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class PartnerDestinationInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected PartnerDestinationInfo() + { + ResourceMoveChangeHistory = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Azure subscription ID of the subscriber. The partner destination associated with the channel will be + /// created under this Azure subscription. + /// + /// + /// Azure Resource Group of the subscriber. The partner destination associated with the channel will be + /// created under this resource group. + /// + /// Name of the partner destination associated with the channel. + /// Type of the endpoint for the partner destination. + /// Additional context of the partner destination endpoint. + /// Change history of the resource move. + /// Keeps track of any properties unknown to the library. + internal PartnerDestinationInfo(string azureSubscriptionId, string resourceGroupName, string name, PartnerEndpointType endpointType, string endpointServiceContext, IList resourceMoveChangeHistory, IDictionary serializedAdditionalRawData) + { + AzureSubscriptionId = azureSubscriptionId; + ResourceGroupName = resourceGroupName; + Name = name; + EndpointType = endpointType; + EndpointServiceContext = endpointServiceContext; + ResourceMoveChangeHistory = resourceMoveChangeHistory; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Azure subscription ID of the subscriber. The partner destination associated with the channel will be + /// created under this Azure subscription. + /// + [WirePath("azureSubscriptionId")] + public string AzureSubscriptionId { get; set; } + /// + /// Azure Resource Group of the subscriber. The partner destination associated with the channel will be + /// created under this resource group. + /// + [WirePath("resourceGroupName")] + public string ResourceGroupName { get; set; } + /// Name of the partner destination associated with the channel. + [WirePath("name")] + public string Name { get; set; } + /// Type of the endpoint for the partner destination. + internal PartnerEndpointType EndpointType { get; set; } + /// Additional context of the partner destination endpoint. + [WirePath("endpointServiceContext")] + public string EndpointServiceContext { get; set; } + /// Change history of the resource move. + [WirePath("resourceMoveChangeHistory")] + public IList ResourceMoveChangeHistory { get; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs new file mode 100644 index 000000000000..8b84e3e43b5a --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class PartnerDestinationPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerDestinationPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PartnerDestinationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerDestinationPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerDestinationPatch(document.RootElement, options); + } + + internal static PartnerDestinationPatch DeserializePartnerDestinationPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PartnerDestinationPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PartnerDestinationPatch)} does not support writing '{options.Format}' format."); + } + } + + PartnerDestinationPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerDestinationPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerDestinationPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.cs new file mode 100644 index 000000000000..6b11a16aabe5 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Properties of the Partner Destination that can be updated. + public partial class PartnerDestinationPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PartnerDestinationPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Tags of the Partner Destination resource. + /// Keeps track of any properties unknown to the library. + internal PartnerDestinationPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Tags of the Partner Destination resource. + [WirePath("tags")] + public IDictionary Tags { get; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationProvisioningState.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationProvisioningState.cs new file mode 100644 index 000000000000..11cbcf4a9b0b --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Provisioning state of the partner destination. + public readonly partial struct PartnerDestinationProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PartnerDestinationProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string SucceededValue = "Succeeded"; + private const string CanceledValue = "Canceled"; + private const string FailedValue = "Failed"; + private const string IdleDueToMirroredChannelResourceDeletionValue = "IdleDueToMirroredChannelResourceDeletion"; + + /// Creating. + public static PartnerDestinationProvisioningState Creating { get; } = new PartnerDestinationProvisioningState(CreatingValue); + /// Updating. + public static PartnerDestinationProvisioningState Updating { get; } = new PartnerDestinationProvisioningState(UpdatingValue); + /// Deleting. + public static PartnerDestinationProvisioningState Deleting { get; } = new PartnerDestinationProvisioningState(DeletingValue); + /// Succeeded. + public static PartnerDestinationProvisioningState Succeeded { get; } = new PartnerDestinationProvisioningState(SucceededValue); + /// Canceled. + public static PartnerDestinationProvisioningState Canceled { get; } = new PartnerDestinationProvisioningState(CanceledValue); + /// Failed. + public static PartnerDestinationProvisioningState Failed { get; } = new PartnerDestinationProvisioningState(FailedValue); + /// IdleDueToMirroredChannelResourceDeletion. + public static PartnerDestinationProvisioningState IdleDueToMirroredChannelResourceDeletion { get; } = new PartnerDestinationProvisioningState(IdleDueToMirroredChannelResourceDeletionValue); + /// Determines if two values are the same. + public static bool operator ==(PartnerDestinationProvisioningState left, PartnerDestinationProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PartnerDestinationProvisioningState left, PartnerDestinationProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PartnerDestinationProvisioningState(string value) => new PartnerDestinationProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PartnerDestinationProvisioningState other && Equals(other); + /// + public bool Equals(PartnerDestinationProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs new file mode 100644 index 000000000000..fbd94853d296 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + internal partial class PartnerDestinationsListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerDestinationsListResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PartnerDestinationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerDestinationsListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerDestinationsListResult(document.RootElement, options); + } + + internal static PartnerDestinationsListResult DeserializePartnerDestinationsListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PartnerDestinationData.DeserializePartnerDestinationData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PartnerDestinationsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PartnerDestinationsListResult)} does not support writing '{options.Format}' format."); + } + } + + PartnerDestinationsListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerDestinationsListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerDestinationsListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.cs new file mode 100644 index 000000000000..cfe50f1cdd18 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Result of the List Partner Destinations operation. + internal partial class PartnerDestinationsListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal PartnerDestinationsListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A collection of partner destinations. + /// A link for the next page of partner destinations. + /// Keeps track of any properties unknown to the library. + internal PartnerDestinationsListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A collection of partner destinations. + public IReadOnlyList Value { get; } + /// A link for the next page of partner destinations. + public string NextLink { get; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEndpointType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEndpointType.cs new file mode 100644 index 000000000000..f08a81759041 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEndpointType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Type of the endpoint for the partner destination. + internal readonly partial struct PartnerEndpointType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PartnerEndpointType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string WebHookValue = "WebHook"; + + /// WebHook. + public static PartnerEndpointType WebHook { get; } = new PartnerEndpointType(WebHookValue); + /// Determines if two values are the same. + public static bool operator ==(PartnerEndpointType left, PartnerEndpointType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PartnerEndpointType left, PartnerEndpointType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PartnerEndpointType(string value) => new PartnerEndpointType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PartnerEndpointType other && Equals(other); + /// + public bool Equals(PartnerEndpointType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs new file mode 100644 index 000000000000..261b33a0a09a --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class PartnerEventSubscriptionDestination : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerEventSubscriptionDestination)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + writer.WriteEndObject(); + } + + PartnerEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerEventSubscriptionDestination)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerEventSubscriptionDestination(document.RootElement, options); + } + + internal static PartnerEventSubscriptionDestination DeserializePartnerEventSubscriptionDestination(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EndpointType endpointType = default; + string resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpointType"u8)) + { + endpointType = new EndpointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("resourceId"u8)) + { + resourceId = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PartnerEventSubscriptionDestination(endpointType, serializedAdditionalRawData, resourceId); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointType: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" endpointType: "); + builder.AppendLine($"'{EndpointType.ToString()}'"); + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceId)) + { + builder.Append(" resourceId: "); + if (ResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceId}'''"); + } + else + { + builder.AppendLine($"'{ResourceId}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PartnerEventSubscriptionDestination)} does not support writing '{options.Format}' format."); + } + } + + PartnerEventSubscriptionDestination IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerEventSubscriptionDestination(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerEventSubscriptionDestination)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.cs new file mode 100644 index 000000000000..f71d9775650d --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// The PartnerEventSubscriptionDestination. + public partial class PartnerEventSubscriptionDestination : EventSubscriptionDestination + { + /// Initializes a new instance of . + public PartnerEventSubscriptionDestination() + { + EndpointType = EndpointType.PartnerDestination; + } + + /// Initializes a new instance of . + /// Type of the endpoint for the event subscription destination. + /// Keeps track of any properties unknown to the library. + /// The Azure Resource Id that represents the endpoint of a Partner Destination of an event subscription. + internal PartnerEventSubscriptionDestination(EndpointType endpointType, IDictionary serializedAdditionalRawData, string resourceId) : base(endpointType, serializedAdditionalRawData) + { + ResourceId = resourceId; + EndpointType = endpointType; + } + + /// The Azure Resource Id that represents the endpoint of a Partner Destination of an event subscription. + [WirePath("properties.resourceId")] + public string ResourceId { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs index faa47985faa0..72ed2b04d796 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs @@ -41,6 +41,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("expirationTimeIfNotActivatedUtc"u8); writer.WriteStringValue(ExpireOnIfNotActivated.Value, "O"); } + if (Optional.IsDefined(PartnerDestinationInfo)) + { + writer.WritePropertyName("partnerDestinationInfo"u8); + writer.WriteObjectValue(PartnerDestinationInfo, options); + } if (Optional.IsDefined(PartnerTopicInfo)) { writer.WritePropertyName("partnerTopicInfo"u8); @@ -85,6 +90,7 @@ internal static PartnerNamespaceChannelPatch DeserializePartnerNamespaceChannelP return null; } DateTimeOffset? expirationTimeIfNotActivatedUtc = default; + PartnerUpdateDestinationInfo partnerDestinationInfo = default; PartnerUpdateTopicInfo partnerTopicInfo = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -108,6 +114,15 @@ internal static PartnerNamespaceChannelPatch DeserializePartnerNamespaceChannelP expirationTimeIfNotActivatedUtc = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("partnerDestinationInfo"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerDestinationInfo = PartnerUpdateDestinationInfo.DeserializePartnerUpdateDestinationInfo(property0.Value, options); + continue; + } if (property0.NameEquals("partnerTopicInfo"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -126,7 +141,7 @@ internal static PartnerNamespaceChannelPatch DeserializePartnerNamespaceChannelP } } serializedAdditionalRawData = rawDataDictionary; - return new PartnerNamespaceChannelPatch(expirationTimeIfNotActivatedUtc, partnerTopicInfo, serializedAdditionalRawData); + return new PartnerNamespaceChannelPatch(expirationTimeIfNotActivatedUtc, partnerDestinationInfo, partnerTopicInfo, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.cs index 9be2d7aae9b1..48b0ba928cdb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.cs @@ -55,11 +55,17 @@ public PartnerNamespaceChannelPatch() /// 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. /// + /// + /// Partner destination properties which can be updated if the channel is of type PartnerDestination. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// /// Partner topic properties which can be updated if the channel is of type PartnerTopic. /// Keeps track of any properties unknown to the library. - internal PartnerNamespaceChannelPatch(DateTimeOffset? expireOnIfNotActivated, PartnerUpdateTopicInfo partnerTopicInfo, IDictionary serializedAdditionalRawData) + internal PartnerNamespaceChannelPatch(DateTimeOffset? expireOnIfNotActivated, PartnerUpdateDestinationInfo partnerDestinationInfo, PartnerUpdateTopicInfo partnerTopicInfo, IDictionary serializedAdditionalRawData) { ExpireOnIfNotActivated = expireOnIfNotActivated; + PartnerDestinationInfo = partnerDestinationInfo; PartnerTopicInfo = partnerTopicInfo; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -70,6 +76,13 @@ internal PartnerNamespaceChannelPatch(DateTimeOffset? expireOnIfNotActivated, Pa /// [WirePath("properties.expirationTimeIfNotActivatedUtc")] public DateTimeOffset? ExpireOnIfNotActivated { get; set; } + /// + /// Partner destination properties which can be updated if the channel is of type PartnerDestination. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + [WirePath("properties.partnerDestinationInfo")] + public PartnerUpdateDestinationInfo PartnerDestinationInfo { get; set; } /// Partner topic properties which can be updated if the channel is of type PartnerTopic. internal PartnerUpdateTopicInfo PartnerTopicInfo { get; set; } /// Event type info for the partner topic. diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelProvisioningState.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelProvisioningState.cs index 43230375ebd5..ef41e338f827 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelProvisioningState.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelProvisioningState.cs @@ -29,6 +29,7 @@ public PartnerNamespaceChannelProvisioningState(string value) private const string CanceledValue = "Canceled"; private const string FailedValue = "Failed"; private const string IdleDueToMirroredPartnerTopicDeletionValue = "IdleDueToMirroredPartnerTopicDeletion"; + private const string IdleDueToMirroredPartnerDestinationDeletionValue = "IdleDueToMirroredPartnerDestinationDeletion"; /// Creating. public static PartnerNamespaceChannelProvisioningState Creating { get; } = new PartnerNamespaceChannelProvisioningState(CreatingValue); @@ -44,6 +45,8 @@ public PartnerNamespaceChannelProvisioningState(string value) public static PartnerNamespaceChannelProvisioningState Failed { get; } = new PartnerNamespaceChannelProvisioningState(FailedValue); /// IdleDueToMirroredPartnerTopicDeletion. public static PartnerNamespaceChannelProvisioningState IdleDueToMirroredPartnerTopicDeletion { get; } = new PartnerNamespaceChannelProvisioningState(IdleDueToMirroredPartnerTopicDeletionValue); + /// IdleDueToMirroredPartnerDestinationDeletion. + public static PartnerNamespaceChannelProvisioningState IdleDueToMirroredPartnerDestinationDeletion { get; } = new PartnerNamespaceChannelProvisioningState(IdleDueToMirroredPartnerDestinationDeletionValue); /// Determines if two values are the same. public static bool operator ==(PartnerNamespaceChannelProvisioningState left, PartnerNamespaceChannelProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelType.cs index 75eba07075a6..fc8f0c14526f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelType.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelType.cs @@ -23,9 +23,12 @@ public PartnerNamespaceChannelType(string value) } private const string PartnerTopicValue = "PartnerTopic"; + private const string PartnerDestinationValue = "PartnerDestination"; /// PartnerTopic. public static PartnerNamespaceChannelType PartnerTopic { get; } = new PartnerNamespaceChannelType(PartnerTopicValue); + /// PartnerDestination. + public static PartnerNamespaceChannelType PartnerDestination { get; } = new PartnerNamespaceChannelType(PartnerDestinationValue); /// Determines if two values are the same. public static bool operator ==(PartnerNamespaceChannelType left, PartnerNamespaceChannelType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.cs index 422056087050..743486e2427e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.cs @@ -60,7 +60,7 @@ public PartnerNamespacePatch() /// /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. /// Minimum TLS version of the publisher allowed to publish to this 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 partner namespace. + /// This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the partner namespace. /// Keeps track of any properties unknown to the library. internal PartnerNamespacePatch(IDictionary tags, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, TlsVersion? minimumTlsVersionAllowed, bool? isLocalAuthDisabled, IDictionary serializedAdditionalRawData) { @@ -87,7 +87,7 @@ internal PartnerNamespacePatch(IDictionary tags, EventGridPublic /// Minimum TLS version of the publisher allowed to publish to this domain. [WirePath("properties.minimumTlsVersionAllowed")] public TlsVersion? MinimumTlsVersionAllowed { get; set; } - /// 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 Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the partner namespace. [WirePath("properties.disableLocalAuth")] public bool? IsLocalAuthDisabled { get; set; } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs new file mode 100644 index 000000000000..208211675822 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + [PersistableModelProxy(typeof(UnknownPartnerUpdateDestinationInfo))] + public partial class PartnerUpdateDestinationInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("endpointType"u8); + writer.WriteStringValue(EndpointType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PartnerUpdateDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerUpdateDestinationInfo(document.RootElement, options); + } + + internal static PartnerUpdateDestinationInfo DeserializePartnerUpdateDestinationInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("endpointType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "WebHook": return WebhookUpdatePartnerDestinationInfo.DeserializeWebhookUpdatePartnerDestinationInfo(element, options); + } + } + return UnknownPartnerUpdateDestinationInfo.DeserializeUnknownPartnerUpdateDestinationInfo(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support writing '{options.Format}' format."); + } + } + + PartnerUpdateDestinationInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerUpdateDestinationInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.cs new file mode 100644 index 000000000000..2a908870bad6 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// + /// Properties of the corresponding partner destination of a Channel. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class PartnerUpdateDestinationInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected PartnerUpdateDestinationInfo() + { + } + + /// Initializes a new instance of . + /// Type of the endpoint for the partner destination. + /// Keeps track of any properties unknown to the library. + internal PartnerUpdateDestinationInfo(PartnerEndpointType endpointType, IDictionary serializedAdditionalRawData) + { + EndpointType = endpointType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of the endpoint for the partner destination. + internal PartnerEndpointType EndpointType { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.cs index e2601d9df716..7fe7bf1ef9e4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.cs @@ -82,7 +82,7 @@ public PushInfo() /// 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. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , and . /// /// Keeps track of any properties unknown to the library. internal PushInfo(int? maxDeliveryCount, string eventTimeToLive, DeadLetterWithResourceIdentity deadLetterDestinationWithResourceIdentity, DeliveryWithResourceIdentity deliveryWithResourceIdentity, EventSubscriptionDestination destination, IDictionary serializedAdditionalRawData) @@ -134,7 +134,7 @@ internal PushInfo(int? maxDeliveryCount, string eventTimeToLive, DeadLetterWithR /// 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. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , and . /// [WirePath("destination")] public EventSubscriptionDestination Destination { get; set; } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs new file mode 100644 index 000000000000..de0282ad690c --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class ResourceAssociation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceAssociation)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(AccessMode)) + { + writer.WritePropertyName("accessMode"u8); + writer.WriteStringValue(AccessMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceAssociation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceAssociation(document.RootElement, options); + } + + internal static ResourceAssociation DeserializeResourceAssociation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + NetworkSecurityPerimeterAssociationAccessMode? accessMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessMode = new NetworkSecurityPerimeterAssociationAccessMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceAssociation(name, accessMode, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessMode)) + { + builder.Append(" accessMode: "); + builder.AppendLine($"'{AccessMode.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ResourceAssociation)} does not support writing '{options.Format}' format."); + } + } + + ResourceAssociation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceAssociation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceAssociation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.cs new file mode 100644 index 000000000000..0877847350e8 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Nsp resource association. + public partial class ResourceAssociation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceAssociation() + { + } + + /// Initializes a new instance of . + /// Association name. + /// Network security perimeter access mode. + /// Keeps track of any properties unknown to the library. + internal ResourceAssociation(string name, NetworkSecurityPerimeterAssociationAccessMode? accessMode, IDictionary serializedAdditionalRawData) + { + Name = name; + AccessMode = accessMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Association name. + [WirePath("name")] + public string Name { get; set; } + /// Network security perimeter access mode. + [WirePath("accessMode")] + public NetworkSecurityPerimeterAssociationAccessMode? AccessMode { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceKind.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceKind.cs new file mode 100644 index 000000000000..cf857d91109a --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceKind.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Kind of the resource. + public readonly partial struct ResourceKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureValue = "Azure"; + private const string AzureArcValue = "AzureArc"; + + /// Azure. + public static ResourceKind Azure { get; } = new ResourceKind(AzureValue); + /// AzureArc. + public static ResourceKind AzureArc { get; } = new ResourceKind(AzureArcValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceKind left, ResourceKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceKind left, ResourceKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceKind(string value) => new ResourceKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceKind other && Equals(other); + /// + public bool Equals(ResourceKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs new file mode 100644 index 000000000000..344df3cb6c89 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class ResourceMoveChangeHistory : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceMoveChangeHistory)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AzureSubscriptionId)) + { + writer.WritePropertyName("azureSubscriptionId"u8); + writer.WriteStringValue(AzureSubscriptionId); + } + if (Optional.IsDefined(ResourceGroupName)) + { + writer.WritePropertyName("resourceGroupName"u8); + writer.WriteStringValue(ResourceGroupName); + } + if (Optional.IsDefined(ChangedTimeUtc)) + { + writer.WritePropertyName("changedTimeUtc"u8); + writer.WriteStringValue(ChangedTimeUtc.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceMoveChangeHistory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceMoveChangeHistory)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceMoveChangeHistory(document.RootElement, options); + } + + internal static ResourceMoveChangeHistory DeserializeResourceMoveChangeHistory(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureSubscriptionId = default; + string resourceGroupName = default; + DateTimeOffset? changedTimeUtc = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureSubscriptionId"u8)) + { + azureSubscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGroupName"u8)) + { + resourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("changedTimeUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + changedTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceMoveChangeHistory(azureSubscriptionId, resourceGroupName, changedTimeUtc, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureSubscriptionId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureSubscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AzureSubscriptionId)) + { + builder.Append(" azureSubscriptionId: "); + if (AzureSubscriptionId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AzureSubscriptionId}'''"); + } + else + { + builder.AppendLine($"'{AzureSubscriptionId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceGroupName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceGroupName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceGroupName)) + { + builder.Append(" resourceGroupName: "); + if (ResourceGroupName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceGroupName}'''"); + } + else + { + builder.AppendLine($"'{ResourceGroupName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ChangedTimeUtc), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" changedTimeUtc: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ChangedTimeUtc)) + { + builder.Append(" changedTimeUtc: "); + var formattedDateTimeString = TypeFormatters.ToString(ChangedTimeUtc.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ResourceMoveChangeHistory)} does not support writing '{options.Format}' format."); + } + } + + ResourceMoveChangeHistory IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceMoveChangeHistory(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceMoveChangeHistory)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.cs new file mode 100644 index 000000000000..91a061f3360a --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// The change history of the resource move. + public partial class ResourceMoveChangeHistory + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceMoveChangeHistory() + { + } + + /// Initializes a new instance of . + /// Azure subscription ID of the resource. + /// Azure Resource Group of the resource. + /// UTC timestamp of when the resource was changed. + /// Keeps track of any properties unknown to the library. + internal ResourceMoveChangeHistory(string azureSubscriptionId, string resourceGroupName, DateTimeOffset? changedTimeUtc, IDictionary serializedAdditionalRawData) + { + AzureSubscriptionId = azureSubscriptionId; + ResourceGroupName = resourceGroupName; + ChangedTimeUtc = changedTimeUtc; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure subscription ID of the resource. + [WirePath("azureSubscriptionId")] + public string AzureSubscriptionId { get; set; } + /// Azure Resource Group of the resource. + [WirePath("resourceGroupName")] + public string ResourceGroupName { get; set; } + /// UTC timestamp of when the resource was changed. + [WirePath("changedTimeUtc")] + public DateTimeOffset? ChangedTimeUtc { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs new file mode 100644 index 000000000000..342f03a73649 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + internal partial class ResourceSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceSku)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceSku(document.RootElement, options); + } + + internal static ResourceSku DeserializeResourceSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EventGridSku? name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new EventGridSku(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceSku(name, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ResourceSku)} does not support writing '{options.Format}' format."); + } + } + + ResourceSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.cs new file mode 100644 index 000000000000..6240f6d113ed --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Describes an EventGrid Resource Sku. + internal partial class ResourceSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceSku() + { + } + + /// Initializes a new instance of . + /// The Sku name of the resource. The possible values are: Basic or Premium. + /// Keeps track of any properties unknown to the library. + internal ResourceSku(EventGridSku? name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Sku name of the resource. The possible values are: Basic or Premium. + [WirePath("name")] + public EventGridSku? Name { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs index eed975114d66..2e8e29bfc533 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs @@ -56,6 +56,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("routingEnrichments"u8); writer.WriteObjectValue(RoutingEnrichments, options); } + if (Optional.IsDefined(ClientAuthentication)) + { + writer.WritePropertyName("clientAuthentication"u8); + writer.WriteObjectValue(ClientAuthentication, options); + } if (Optional.IsDefined(MaximumSessionExpiryInHours)) { writer.WritePropertyName("maximumSessionExpiryInHours"u8); @@ -122,6 +127,7 @@ internal static TopicSpacesConfiguration DeserializeTopicSpacesConfiguration(Jso string routeTopicResourceId = default; string hostname = default; RoutingEnrichments routingEnrichments = default; + ClientAuthenticationSettings clientAuthentication = default; int? maximumSessionExpiryInHours = default; int? maximumClientSessionsPerAuthenticationName = default; RoutingIdentityInfo routingIdentityInfo = default; @@ -158,6 +164,15 @@ internal static TopicSpacesConfiguration DeserializeTopicSpacesConfiguration(Jso routingEnrichments = RoutingEnrichments.DeserializeRoutingEnrichments(property.Value, options); continue; } + if (property.NameEquals("clientAuthentication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientAuthentication = ClientAuthenticationSettings.DeserializeClientAuthenticationSettings(property.Value, options); + continue; + } if (property.NameEquals("maximumSessionExpiryInHours"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -210,6 +225,7 @@ internal static TopicSpacesConfiguration DeserializeTopicSpacesConfiguration(Jso routeTopicResourceId, hostname, routingEnrichments, + clientAuthentication, maximumSessionExpiryInHours, maximumClientSessionsPerAuthenticationName, routingIdentityInfo, @@ -304,6 +320,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientAuthentication), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientAuthentication: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientAuthentication)) + { + builder.Append(" clientAuthentication: "); + BicepSerializationHelpers.AppendChildObject(builder, ClientAuthentication, options, 2, false, " clientAuthentication: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaximumSessionExpiryInHours), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.cs index d0587f4fd4d5..9224cc574456 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.cs @@ -60,6 +60,7 @@ public TopicSpacesConfiguration() /// /// The endpoint for the topic spaces configuration. This is a read-only property. /// Routing enrichments for topic spaces configuration. + /// Client authentication settings for topic spaces configuration. /// /// 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. @@ -71,12 +72,13 @@ public TopicSpacesConfiguration() /// Routing identity info for topic spaces configuration. /// List of custom domain configurations for the namespace. /// Keeps track of any properties unknown to the library. - internal TopicSpacesConfiguration(TopicSpacesConfigurationState? state, string routeTopicResourceId, string hostname, RoutingEnrichments routingEnrichments, int? maximumSessionExpiryInHours, int? maximumClientSessionsPerAuthenticationName, RoutingIdentityInfo routingIdentityInfo, IList customDomains, IDictionary serializedAdditionalRawData) + internal TopicSpacesConfiguration(TopicSpacesConfigurationState? state, string routeTopicResourceId, string hostname, RoutingEnrichments routingEnrichments, ClientAuthenticationSettings clientAuthentication, int? maximumSessionExpiryInHours, int? maximumClientSessionsPerAuthenticationName, RoutingIdentityInfo routingIdentityInfo, IList customDomains, IDictionary serializedAdditionalRawData) { State = state; RouteTopicResourceId = routeTopicResourceId; Hostname = hostname; RoutingEnrichments = routingEnrichments; + ClientAuthentication = clientAuthentication; MaximumSessionExpiryInHours = maximumSessionExpiryInHours; MaximumClientSessionsPerAuthenticationName = maximumClientSessionsPerAuthenticationName; RoutingIdentityInfo = routingIdentityInfo; @@ -100,6 +102,9 @@ internal TopicSpacesConfiguration(TopicSpacesConfigurationState? state, string r /// Routing enrichments for topic spaces configuration. [WirePath("routingEnrichments")] public RoutingEnrichments RoutingEnrichments { get; set; } + /// Client authentication settings for topic spaces configuration. + [WirePath("clientAuthentication")] + public ClientAuthenticationSettings ClientAuthentication { get; set; } /// /// 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. diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs new file mode 100644 index 000000000000..c47a3afe2a38 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + internal partial class UnknownPartnerClientAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + PartnerClientAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerClientAuthentication(document.RootElement, options); + } + + internal static UnknownPartnerClientAuthentication DeserializeUnknownPartnerClientAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PartnerClientAuthenticationType clientAuthenticationType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientAuthenticationType"u8)) + { + clientAuthenticationType = new PartnerClientAuthenticationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownPartnerClientAuthentication(clientAuthenticationType, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientAuthenticationType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientAuthenticationType: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" clientAuthenticationType: "); + builder.AppendLine($"'{ClientAuthenticationType.ToString()}'"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support writing '{options.Format}' format."); + } + } + + PartnerClientAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerClientAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.cs new file mode 100644 index 000000000000..2c7581c7b54c --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Unknown version of PartnerClientAuthentication. + internal partial class UnknownPartnerClientAuthentication : PartnerClientAuthentication + { + /// Initializes a new instance of . + /// Type of client authentication. + /// Keeps track of any properties unknown to the library. + internal UnknownPartnerClientAuthentication(PartnerClientAuthenticationType clientAuthenticationType, IDictionary serializedAdditionalRawData) : base(clientAuthenticationType, serializedAdditionalRawData) + { + ClientAuthenticationType = clientAuthenticationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownPartnerClientAuthentication() + { + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs new file mode 100644 index 000000000000..6ed264de3d31 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + internal partial class UnknownPartnerDestinationInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + PartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerDestinationInfo(document.RootElement, options); + } + + internal static UnknownPartnerDestinationInfo DeserializeUnknownPartnerDestinationInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureSubscriptionId = default; + string resourceGroupName = default; + string name = default; + PartnerEndpointType endpointType = "Unknown"; + string endpointServiceContext = default; + IList resourceMoveChangeHistory = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureSubscriptionId"u8)) + { + azureSubscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGroupName"u8)) + { + resourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointType"u8)) + { + endpointType = new PartnerEndpointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("endpointServiceContext"u8)) + { + endpointServiceContext = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceMoveChangeHistory"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.ResourceMoveChangeHistory.DeserializeResourceMoveChangeHistory(item, options)); + } + resourceMoveChangeHistory = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownPartnerDestinationInfo( + azureSubscriptionId, + resourceGroupName, + name, + endpointType, + endpointServiceContext, + resourceMoveChangeHistory ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureSubscriptionId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureSubscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AzureSubscriptionId)) + { + builder.Append(" azureSubscriptionId: "); + if (AzureSubscriptionId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AzureSubscriptionId}'''"); + } + else + { + builder.AppendLine($"'{AzureSubscriptionId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceGroupName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceGroupName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceGroupName)) + { + builder.Append(" resourceGroupName: "); + if (ResourceGroupName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceGroupName}'''"); + } + else + { + builder.AppendLine($"'{ResourceGroupName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointType: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" endpointType: "); + builder.AppendLine($"'{EndpointType.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointServiceContext), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointServiceContext: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointServiceContext)) + { + builder.Append(" endpointServiceContext: "); + if (EndpointServiceContext.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EndpointServiceContext}'''"); + } + else + { + builder.AppendLine($"'{EndpointServiceContext}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceMoveChangeHistory), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceMoveChangeHistory: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ResourceMoveChangeHistory)) + { + if (ResourceMoveChangeHistory.Any()) + { + builder.Append(" resourceMoveChangeHistory: "); + builder.AppendLine("["); + foreach (var item in ResourceMoveChangeHistory) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " resourceMoveChangeHistory: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support writing '{options.Format}' format."); + } + } + + PartnerDestinationInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerDestinationInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.cs new file mode 100644 index 000000000000..210ecfd20c38 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Unknown version of PartnerDestinationInfo. + internal partial class UnknownPartnerDestinationInfo : PartnerDestinationInfo + { + /// Initializes a new instance of . + /// + /// Azure subscription ID of the subscriber. The partner destination associated with the channel will be + /// created under this Azure subscription. + /// + /// + /// Azure Resource Group of the subscriber. The partner destination associated with the channel will be + /// created under this resource group. + /// + /// Name of the partner destination associated with the channel. + /// Type of the endpoint for the partner destination. + /// Additional context of the partner destination endpoint. + /// Change history of the resource move. + /// Keeps track of any properties unknown to the library. + internal UnknownPartnerDestinationInfo(string azureSubscriptionId, string resourceGroupName, string name, PartnerEndpointType endpointType, string endpointServiceContext, IList resourceMoveChangeHistory, IDictionary serializedAdditionalRawData) : base(azureSubscriptionId, resourceGroupName, name, endpointType, endpointServiceContext, resourceMoveChangeHistory, serializedAdditionalRawData) + { + EndpointType = endpointType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownPartnerDestinationInfo() + { + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs new file mode 100644 index 000000000000..84fc7f110981 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + internal partial class UnknownPartnerUpdateDestinationInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + PartnerUpdateDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerUpdateDestinationInfo(document.RootElement, options); + } + + internal static UnknownPartnerUpdateDestinationInfo DeserializeUnknownPartnerUpdateDestinationInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PartnerEndpointType endpointType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpointType"u8)) + { + endpointType = new PartnerEndpointType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownPartnerUpdateDestinationInfo(endpointType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support writing '{options.Format}' format."); + } + } + + PartnerUpdateDestinationInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerUpdateDestinationInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.cs new file mode 100644 index 000000000000..f528c56da277 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Unknown version of PartnerUpdateDestinationInfo. + internal partial class UnknownPartnerUpdateDestinationInfo : PartnerUpdateDestinationInfo + { + /// Initializes a new instance of . + /// Type of the endpoint for the partner destination. + /// Keeps track of any properties unknown to the library. + internal UnknownPartnerUpdateDestinationInfo(PartnerEndpointType endpointType, IDictionary serializedAdditionalRawData) : base(endpointType, serializedAdditionalRawData) + { + EndpointType = endpointType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownPartnerUpdateDestinationInfo() + { + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs index 5e5177fb4e05..d90b61cc31d4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs @@ -49,6 +49,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("routingEnrichments"u8); writer.WriteObjectValue(RoutingEnrichments, options); } + if (Optional.IsDefined(ClientAuthentication)) + { + writer.WritePropertyName("clientAuthentication"u8); + writer.WriteObjectValue(ClientAuthentication, options); + } if (Optional.IsDefined(MaximumSessionExpiryInHours)) { writer.WritePropertyName("maximumSessionExpiryInHours"u8); @@ -114,6 +119,7 @@ internal static UpdateTopicSpacesConfigurationInfo DeserializeUpdateTopicSpacesC TopicSpacesConfigurationState? state = default; string routeTopicResourceId = default; RoutingEnrichments routingEnrichments = default; + ClientAuthenticationSettings clientAuthentication = default; int? maximumSessionExpiryInHours = default; int? maximumClientSessionsPerAuthenticationName = default; RoutingIdentityInfo routingIdentityInfo = default; @@ -145,6 +151,15 @@ internal static UpdateTopicSpacesConfigurationInfo DeserializeUpdateTopicSpacesC routingEnrichments = RoutingEnrichments.DeserializeRoutingEnrichments(property.Value, options); continue; } + if (property.NameEquals("clientAuthentication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientAuthentication = ClientAuthenticationSettings.DeserializeClientAuthenticationSettings(property.Value, options); + continue; + } if (property.NameEquals("maximumSessionExpiryInHours"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -196,6 +211,7 @@ internal static UpdateTopicSpacesConfigurationInfo DeserializeUpdateTopicSpacesC state, routeTopicResourceId, routingEnrichments, + clientAuthentication, maximumSessionExpiryInHours, maximumClientSessionsPerAuthenticationName, routingIdentityInfo, diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.cs index af87a0d63c37..df2e5dfb3d10 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.cs @@ -55,6 +55,7 @@ public UpdateTopicSpacesConfigurationInfo() /// Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled. /// This property is used to specify custom topic to which events will be routed to from topic spaces configuration under namespace. /// Routing enrichments for topic spaces configuration. + /// Client authentication settings for topic spaces configuration. /// /// 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. @@ -66,11 +67,12 @@ public UpdateTopicSpacesConfigurationInfo() /// Routing identity info for topic spaces configuration. /// Custom domain info for topic spaces configuration. /// Keeps track of any properties unknown to the library. - internal UpdateTopicSpacesConfigurationInfo(TopicSpacesConfigurationState? state, string routeTopicResourceId, RoutingEnrichments routingEnrichments, int? maximumSessionExpiryInHours, int? maximumClientSessionsPerAuthenticationName, RoutingIdentityInfo routingIdentityInfo, IList customDomains, IDictionary serializedAdditionalRawData) + internal UpdateTopicSpacesConfigurationInfo(TopicSpacesConfigurationState? state, string routeTopicResourceId, RoutingEnrichments routingEnrichments, ClientAuthenticationSettings clientAuthentication, int? maximumSessionExpiryInHours, int? maximumClientSessionsPerAuthenticationName, RoutingIdentityInfo routingIdentityInfo, IList customDomains, IDictionary serializedAdditionalRawData) { State = state; RouteTopicResourceId = routeTopicResourceId; RoutingEnrichments = routingEnrichments; + ClientAuthentication = clientAuthentication; MaximumSessionExpiryInHours = maximumSessionExpiryInHours; MaximumClientSessionsPerAuthenticationName = maximumClientSessionsPerAuthenticationName; RoutingIdentityInfo = routingIdentityInfo; @@ -87,6 +89,9 @@ internal UpdateTopicSpacesConfigurationInfo(TopicSpacesConfigurationState? state /// Routing enrichments for topic spaces configuration. [WirePath("routingEnrichments")] public RoutingEnrichments RoutingEnrichments { get; set; } + /// Client authentication settings for topic spaces configuration. + [WirePath("clientAuthentication")] + public ClientAuthenticationSettings ClientAuthentication { get; set; } /// /// 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. diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.cs index 663e3ec0fcda..10bca6fed11f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.cs @@ -27,8 +27,8 @@ public WebHookEventSubscriptionDestination() /// The base URL that represents the endpoint of the destination of an event subscription. /// Maximum number of events per batch. /// Preferred batch size in Kilobytes. - /// 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 Application ID or URI to get the access token that will be included as the bearer token in delivery requests. + /// The Microsoft Entra ID Tenant ID to get the access token that will be included as the bearer token in delivery requests. + /// The Microsoft Entra ID Application ID or URI to get the access token that will be included as the bearer token in delivery requests. /// /// Delivery attribute details. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -60,10 +60,10 @@ internal WebHookEventSubscriptionDestination(EndpointType endpointType, IDiction /// Preferred batch size in Kilobytes. [WirePath("properties.preferredBatchSizeInKilobytes")] public int? PreferredBatchSizeInKilobytes { get; set; } - /// The Azure Active Directory Tenant ID to get the access token that will be included as the bearer token in delivery requests. + /// The Microsoft Entra ID Tenant ID to get the access token that will be included as the bearer token in delivery requests. [WirePath("properties.azureActiveDirectoryTenantId")] public Guid? AzureActiveDirectoryTenantId { get; set; } - /// 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 Microsoft Entra ID Application ID or URI to get the access token that will be included as the bearer token in delivery requests. [WirePath("properties.azureActiveDirectoryApplicationIdOrUri")] public string UriOrAzureActiveDirectoryApplicationId { get; set; } /// diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookAuthenticationSettings.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookAuthenticationSettings.Serialization.cs new file mode 100644 index 000000000000..ded6af9c0433 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookAuthenticationSettings.Serialization.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class WebhookAuthenticationSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebhookAuthenticationSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + writer.WritePropertyName("endpointUrl"u8); + writer.WriteStringValue(EndpointUri.AbsoluteUri); + if (Optional.IsDefined(EndpointBaseUri)) + { + writer.WritePropertyName("endpointBaseUrl"u8); + writer.WriteStringValue(EndpointBaseUri.AbsoluteUri); + } + writer.WritePropertyName("azureActiveDirectoryApplicationIdOrUri"u8); + writer.WriteStringValue(AzureActiveDirectoryApplicationIdOrUri.AbsoluteUri); + writer.WritePropertyName("azureActiveDirectoryTenantId"u8); + writer.WriteStringValue(AzureActiveDirectoryTenantId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WebhookAuthenticationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebhookAuthenticationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebhookAuthenticationSettings(document.RootElement, options); + } + + internal static WebhookAuthenticationSettings DeserializeWebhookAuthenticationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CustomWebhookAuthenticationManagedIdentity identity = default; + Uri endpointUri = default; + Uri endpointBaseUri = default; + Uri azureActiveDirectoryApplicationIdOrUri = default; + string azureActiveDirectoryTenantId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + identity = CustomWebhookAuthenticationManagedIdentity.DeserializeCustomWebhookAuthenticationManagedIdentity(property.Value, options); + continue; + } + if (property.NameEquals("endpointUrl"u8)) + { + endpointUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("endpointBaseUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointBaseUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("azureActiveDirectoryApplicationIdOrUri"u8)) + { + azureActiveDirectoryApplicationIdOrUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("azureActiveDirectoryTenantId"u8)) + { + azureActiveDirectoryTenantId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebhookAuthenticationSettings( + identity, + endpointUri, + endpointBaseUri, + azureActiveDirectoryApplicationIdOrUri, + azureActiveDirectoryTenantId, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointUri)) + { + builder.Append(" endpointUrl: "); + builder.AppendLine($"'{EndpointUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointBaseUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointBaseUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointBaseUri)) + { + builder.Append(" endpointBaseUrl: "); + builder.AppendLine($"'{EndpointBaseUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureActiveDirectoryApplicationIdOrUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureActiveDirectoryApplicationIdOrUri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AzureActiveDirectoryApplicationIdOrUri)) + { + builder.Append(" azureActiveDirectoryApplicationIdOrUri: "); + builder.AppendLine($"'{AzureActiveDirectoryApplicationIdOrUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureActiveDirectoryTenantId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureActiveDirectoryTenantId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AzureActiveDirectoryTenantId)) + { + builder.Append(" azureActiveDirectoryTenantId: "); + if (AzureActiveDirectoryTenantId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AzureActiveDirectoryTenantId}'''"); + } + else + { + builder.AppendLine($"'{AzureActiveDirectoryTenantId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebhookAuthenticationSettings)} does not support writing '{options.Format}' format."); + } + } + + WebhookAuthenticationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWebhookAuthenticationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebhookAuthenticationSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookAuthenticationSettings.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookAuthenticationSettings.cs new file mode 100644 index 000000000000..fc3af3df0b11 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookAuthenticationSettings.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Authentication settings for a webhook endpoint within a Namespace resource. + public partial class WebhookAuthenticationSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The identity configuration required for authenticating a custom webhook. + /// The URL endpoint where the Event Grid service sends authenticated webhook requests using the specified managed identity. + /// Microsoft Entra ID Application ID or URI to get the access token that will be included as the bearer token in delivery requests. + /// Microsoft Entra ID Tenant ID to get the access token that will be included as the bearer token in delivery requests. + /// , , or is null. + public WebhookAuthenticationSettings(CustomWebhookAuthenticationManagedIdentity identity, Uri endpointUri, Uri azureActiveDirectoryApplicationIdOrUri, string azureActiveDirectoryTenantId) + { + Argument.AssertNotNull(identity, nameof(identity)); + Argument.AssertNotNull(endpointUri, nameof(endpointUri)); + Argument.AssertNotNull(azureActiveDirectoryApplicationIdOrUri, nameof(azureActiveDirectoryApplicationIdOrUri)); + Argument.AssertNotNull(azureActiveDirectoryTenantId, nameof(azureActiveDirectoryTenantId)); + + Identity = identity; + EndpointUri = endpointUri; + AzureActiveDirectoryApplicationIdOrUri = azureActiveDirectoryApplicationIdOrUri; + AzureActiveDirectoryTenantId = azureActiveDirectoryTenantId; + } + + /// Initializes a new instance of . + /// The identity configuration required for authenticating a custom webhook. + /// The URL endpoint where the Event Grid service sends authenticated webhook requests using the specified managed identity. + /// The base URL endpoint where the Event Grid service sends authenticated webhook requests using the specified managed identity. + /// Microsoft Entra ID Application ID or URI to get the access token that will be included as the bearer token in delivery requests. + /// Microsoft Entra ID Tenant ID to get the access token that will be included as the bearer token in delivery requests. + /// Keeps track of any properties unknown to the library. + internal WebhookAuthenticationSettings(CustomWebhookAuthenticationManagedIdentity identity, Uri endpointUri, Uri endpointBaseUri, Uri azureActiveDirectoryApplicationIdOrUri, string azureActiveDirectoryTenantId, IDictionary serializedAdditionalRawData) + { + Identity = identity; + EndpointUri = endpointUri; + EndpointBaseUri = endpointBaseUri; + AzureActiveDirectoryApplicationIdOrUri = azureActiveDirectoryApplicationIdOrUri; + AzureActiveDirectoryTenantId = azureActiveDirectoryTenantId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WebhookAuthenticationSettings() + { + } + + /// The identity configuration required for authenticating a custom webhook. + [WirePath("identity")] + public CustomWebhookAuthenticationManagedIdentity Identity { get; set; } + /// The URL endpoint where the Event Grid service sends authenticated webhook requests using the specified managed identity. + [WirePath("endpointUrl")] + public Uri EndpointUri { get; set; } + /// The base URL endpoint where the Event Grid service sends authenticated webhook requests using the specified managed identity. + [WirePath("endpointBaseUrl")] + public Uri EndpointBaseUri { get; set; } + /// Microsoft Entra ID Application ID or URI to get the access token that will be included as the bearer token in delivery requests. + [WirePath("azureActiveDirectoryApplicationIdOrUri")] + public Uri AzureActiveDirectoryApplicationIdOrUri { get; set; } + /// Microsoft Entra ID Tenant ID to get the access token that will be included as the bearer token in delivery requests. + [WirePath("azureActiveDirectoryTenantId")] + public string AzureActiveDirectoryTenantId { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs new file mode 100644 index 000000000000..101513e4ea6d --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs @@ -0,0 +1,413 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class WebhookPartnerDestinationInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebhookPartnerDestinationInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(EndpointUri)) + { + writer.WritePropertyName("endpointUrl"u8); + writer.WriteStringValue(EndpointUri.AbsoluteUri); + } + if (Optional.IsDefined(EndpointBaseUri)) + { + writer.WritePropertyName("endpointBaseUrl"u8); + writer.WriteStringValue(EndpointBaseUri.AbsoluteUri); + } + if (Optional.IsDefined(ClientAuthentication)) + { + writer.WritePropertyName("clientAuthentication"u8); + writer.WriteObjectValue(ClientAuthentication, options); + } + writer.WriteEndObject(); + } + + WebhookPartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebhookPartnerDestinationInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebhookPartnerDestinationInfo(document.RootElement, options); + } + + internal static WebhookPartnerDestinationInfo DeserializeWebhookPartnerDestinationInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureSubscriptionId = default; + string resourceGroupName = default; + string name = default; + PartnerEndpointType endpointType = default; + string endpointServiceContext = default; + IList resourceMoveChangeHistory = default; + Uri endpointUri = default; + Uri endpointBaseUri = default; + PartnerClientAuthentication clientAuthentication = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureSubscriptionId"u8)) + { + azureSubscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGroupName"u8)) + { + resourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointType"u8)) + { + endpointType = new PartnerEndpointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("endpointServiceContext"u8)) + { + endpointServiceContext = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceMoveChangeHistory"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.ResourceMoveChangeHistory.DeserializeResourceMoveChangeHistory(item, options)); + } + resourceMoveChangeHistory = array; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("endpointUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointUri = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("endpointBaseUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointBaseUri = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("clientAuthentication"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientAuthentication = PartnerClientAuthentication.DeserializePartnerClientAuthentication(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebhookPartnerDestinationInfo( + azureSubscriptionId, + resourceGroupName, + name, + endpointType, + endpointServiceContext, + resourceMoveChangeHistory ?? new ChangeTrackingList(), + serializedAdditionalRawData, + endpointUri, + endpointBaseUri, + clientAuthentication); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureSubscriptionId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureSubscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AzureSubscriptionId)) + { + builder.Append(" azureSubscriptionId: "); + if (AzureSubscriptionId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AzureSubscriptionId}'''"); + } + else + { + builder.AppendLine($"'{AzureSubscriptionId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceGroupName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceGroupName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceGroupName)) + { + builder.Append(" resourceGroupName: "); + if (ResourceGroupName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceGroupName}'''"); + } + else + { + builder.AppendLine($"'{ResourceGroupName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointType: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" endpointType: "); + builder.AppendLine($"'{EndpointType.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointServiceContext), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointServiceContext: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointServiceContext)) + { + builder.Append(" endpointServiceContext: "); + if (EndpointServiceContext.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EndpointServiceContext}'''"); + } + else + { + builder.AppendLine($"'{EndpointServiceContext}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceMoveChangeHistory), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceMoveChangeHistory: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ResourceMoveChangeHistory)) + { + if (ResourceMoveChangeHistory.Any()) + { + builder.Append(" resourceMoveChangeHistory: "); + builder.AppendLine("["); + foreach (var item in ResourceMoveChangeHistory) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " resourceMoveChangeHistory: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointUri)) + { + builder.Append(" endpointUrl: "); + builder.AppendLine($"'{EndpointUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointBaseUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointBaseUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointBaseUri)) + { + builder.Append(" endpointBaseUrl: "); + builder.AppendLine($"'{EndpointBaseUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientAuthentication), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientAuthentication: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientAuthentication)) + { + builder.Append(" clientAuthentication: "); + BicepSerializationHelpers.AppendChildObject(builder, ClientAuthentication, options, 4, false, " clientAuthentication: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebhookPartnerDestinationInfo)} does not support writing '{options.Format}' format."); + } + } + + WebhookPartnerDestinationInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWebhookPartnerDestinationInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebhookPartnerDestinationInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.cs new file mode 100644 index 000000000000..a4a51a5948fd --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Information about the WebHook of the partner destination. + public partial class WebhookPartnerDestinationInfo : PartnerDestinationInfo + { + /// Initializes a new instance of . + public WebhookPartnerDestinationInfo() + { + EndpointType = PartnerEndpointType.WebHook; + } + + /// Initializes a new instance of . + /// + /// Azure subscription ID of the subscriber. The partner destination associated with the channel will be + /// created under this Azure subscription. + /// + /// + /// Azure Resource Group of the subscriber. The partner destination associated with the channel will be + /// created under this resource group. + /// + /// Name of the partner destination associated with the channel. + /// Type of the endpoint for the partner destination. + /// Additional context of the partner destination endpoint. + /// Change history of the resource move. + /// Keeps track of any properties unknown to the library. + /// The URL that represents the endpoint of the partner destination. + /// The base URL that represents the endpoint of the partner destination. + /// + /// Partner client authentication + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal WebhookPartnerDestinationInfo(string azureSubscriptionId, string resourceGroupName, string name, PartnerEndpointType endpointType, string endpointServiceContext, IList resourceMoveChangeHistory, IDictionary serializedAdditionalRawData, Uri endpointUri, Uri endpointBaseUri, PartnerClientAuthentication clientAuthentication) : base(azureSubscriptionId, resourceGroupName, name, endpointType, endpointServiceContext, resourceMoveChangeHistory, serializedAdditionalRawData) + { + EndpointUri = endpointUri; + EndpointBaseUri = endpointBaseUri; + ClientAuthentication = clientAuthentication; + EndpointType = endpointType; + } + + /// The URL that represents the endpoint of the partner destination. + [WirePath("properties.endpointUrl")] + public Uri EndpointUri { get; set; } + /// The base URL that represents the endpoint of the partner destination. + [WirePath("properties.endpointBaseUrl")] + public Uri EndpointBaseUri { get; set; } + /// + /// Partner client authentication + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + [WirePath("properties.clientAuthentication")] + public PartnerClientAuthentication ClientAuthentication { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs new file mode 100644 index 000000000000..1c2d31bb2192 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EventGrid.Models +{ + public partial class WebhookUpdatePartnerDestinationInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebhookUpdatePartnerDestinationInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(EndpointUri)) + { + writer.WritePropertyName("endpointUrl"u8); + writer.WriteStringValue(EndpointUri.AbsoluteUri); + } + if (Optional.IsDefined(EndpointBaseUri)) + { + writer.WritePropertyName("endpointBaseUrl"u8); + writer.WriteStringValue(EndpointBaseUri.AbsoluteUri); + } + if (Optional.IsDefined(ClientAuthentication)) + { + writer.WritePropertyName("clientAuthentication"u8); + writer.WriteObjectValue(ClientAuthentication, options); + } + writer.WriteEndObject(); + } + + WebhookUpdatePartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebhookUpdatePartnerDestinationInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebhookUpdatePartnerDestinationInfo(document.RootElement, options); + } + + internal static WebhookUpdatePartnerDestinationInfo DeserializeWebhookUpdatePartnerDestinationInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PartnerEndpointType endpointType = default; + Uri endpointUri = default; + Uri endpointBaseUri = default; + PartnerClientAuthentication clientAuthentication = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpointType"u8)) + { + endpointType = new PartnerEndpointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("endpointUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointUri = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("endpointBaseUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointBaseUri = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("clientAuthentication"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientAuthentication = PartnerClientAuthentication.DeserializePartnerClientAuthentication(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebhookUpdatePartnerDestinationInfo(endpointType, serializedAdditionalRawData, endpointUri, endpointBaseUri, clientAuthentication); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WebhookUpdatePartnerDestinationInfo)} does not support writing '{options.Format}' format."); + } + } + + WebhookUpdatePartnerDestinationInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWebhookUpdatePartnerDestinationInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebhookUpdatePartnerDestinationInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.cs new file mode 100644 index 000000000000..89694fbcddbd --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// Information about the update of the WebHook of the partner destination. + public partial class WebhookUpdatePartnerDestinationInfo : PartnerUpdateDestinationInfo + { + /// Initializes a new instance of . + public WebhookUpdatePartnerDestinationInfo() + { + EndpointType = PartnerEndpointType.WebHook; + } + + /// Initializes a new instance of . + /// Type of the endpoint for the partner destination. + /// Keeps track of any properties unknown to the library. + /// The URL that represents the endpoint of the partner destination. + /// The base URL that represents the endpoint of the partner destination. + /// + /// Partner client authentication + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal WebhookUpdatePartnerDestinationInfo(PartnerEndpointType endpointType, IDictionary serializedAdditionalRawData, Uri endpointUri, Uri endpointBaseUri, PartnerClientAuthentication clientAuthentication) : base(endpointType, serializedAdditionalRawData) + { + EndpointUri = endpointUri; + EndpointBaseUri = endpointBaseUri; + ClientAuthentication = clientAuthentication; + EndpointType = endpointType; + } + + /// The URL that represents the endpoint of the partner destination. + [WirePath("properties.endpointUrl")] + public Uri EndpointUri { get; set; } + /// The base URL that represents the endpoint of the partner destination. + [WirePath("properties.endpointBaseUrl")] + public Uri EndpointBaseUri { get; set; } + /// + /// Partner client authentication + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + [WirePath("properties.clientAuthentication")] + public PartnerClientAuthentication ClientAuthentication { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicCollection.cs index 71de34fb10df..7e58d62b61b6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string topi /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string topicName, Cancellati /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(string filter = null, int /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string topicName, Cancella /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string topicName, CancellationToken cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionCollection.cs index 3c19f937d431..7c0a8a1cbf5b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string even /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(string f /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string eventSubscriptionNa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string eventSubscriptionName, CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs index 44d327d4a3f1..1cf444818c7c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Text; using System.Text.Json; using Azure.Core; @@ -65,6 +66,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("expirationTimeUtc"u8); writer.WriteStringValue(ExpireOn.Value, "O"); } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } writer.WriteEndObject(); } @@ -97,6 +109,7 @@ internal static NamespaceTopicEventSubscriptionData DeserializeNamespaceTopicEve DeliverySchema? eventDeliverySchema = default; FiltersConfiguration filtersConfiguration = default; DateTimeOffset? expirationTimeUtc = default; + IDictionary tags = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -179,6 +192,20 @@ internal static NamespaceTopicEventSubscriptionData DeserializeNamespaceTopicEve expirationTimeUtc = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("tags"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + tags = dictionary; + continue; + } } continue; } @@ -198,6 +225,7 @@ internal static NamespaceTopicEventSubscriptionData DeserializeNamespaceTopicEve eventDeliverySchema, filtersConfiguration, expirationTimeUtc, + tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } @@ -343,6 +371,43 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.cs index bfaba3dc2a94..edaffea260f3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.cs @@ -54,6 +54,7 @@ public partial class NamespaceTopicEventSubscriptionData : ResourceData /// Initializes a new instance of . public NamespaceTopicEventSubscriptionData() { + Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -66,14 +67,16 @@ public NamespaceTopicEventSubscriptionData() /// The event delivery schema for the event subscription. /// Information about the filter for the event subscription. /// Expiration time of the event subscription. + /// Tags relating to Event Subscription resource. /// Keeps track of any properties unknown to the library. - internal NamespaceTopicEventSubscriptionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SubscriptionProvisioningState? provisioningState, DeliveryConfiguration deliveryConfiguration, DeliverySchema? eventDeliverySchema, FiltersConfiguration filtersConfiguration, DateTimeOffset? expireOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal NamespaceTopicEventSubscriptionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SubscriptionProvisioningState? provisioningState, DeliveryConfiguration deliveryConfiguration, DeliverySchema? eventDeliverySchema, FiltersConfiguration filtersConfiguration, DateTimeOffset? expireOn, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; DeliveryConfiguration = deliveryConfiguration; EventDeliverySchema = eventDeliverySchema; FiltersConfiguration = filtersConfiguration; ExpireOn = expireOn; + Tags = tags; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -92,5 +95,8 @@ internal NamespaceTopicEventSubscriptionData(ResourceIdentifier id, string name, /// Expiration time of the event subscription. [WirePath("properties.expirationTimeUtc")] public DateTimeOffset? ExpireOn { get; set; } + /// Tags relating to Event Subscription resource. + [WirePath("properties.tags")] + public IDictionary Tags { get; } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionResource.cs index 07be68d039b4..2ab957095cad 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionResource.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -104,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -144,7 +145,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -184,7 +185,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -226,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -268,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -314,7 +315,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -360,7 +361,7 @@ public virtual ArmOperation Update(Wait /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -389,7 +390,7 @@ public virtual AsyncPageable GetDeliveryAttributesAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -418,7 +419,7 @@ public virtual Pageable GetDeliveryAttributes(Cancella /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -456,7 +457,7 @@ public virtual async Task> GetFullUriAsync(Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -480,5 +481,363 @@ public virtual Response GetFullUri(CancellationToken cancel throw; } } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName} + /// + /// + /// Operation Id + /// NamespaceTopicEventSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _namespaceTopicEventSubscriptionClientDiagnostics.CreateScope("NamespaceTopicEventSubscriptionResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _namespaceTopicEventSubscriptionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NamespaceTopicEventSubscriptionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NamespaceTopicEventSubscriptionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName} + /// + /// + /// Operation Id + /// NamespaceTopicEventSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _namespaceTopicEventSubscriptionClientDiagnostics.CreateScope("NamespaceTopicEventSubscriptionResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _namespaceTopicEventSubscriptionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new NamespaceTopicEventSubscriptionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NamespaceTopicEventSubscriptionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName} + /// + /// + /// Operation Id + /// NamespaceTopicEventSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _namespaceTopicEventSubscriptionClientDiagnostics.CreateScope("NamespaceTopicEventSubscriptionResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _namespaceTopicEventSubscriptionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NamespaceTopicEventSubscriptionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NamespaceTopicEventSubscriptionPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName} + /// + /// + /// Operation Id + /// NamespaceTopicEventSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _namespaceTopicEventSubscriptionClientDiagnostics.CreateScope("NamespaceTopicEventSubscriptionResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _namespaceTopicEventSubscriptionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new NamespaceTopicEventSubscriptionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NamespaceTopicEventSubscriptionPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName} + /// + /// + /// Operation Id + /// NamespaceTopicEventSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _namespaceTopicEventSubscriptionClientDiagnostics.CreateScope("NamespaceTopicEventSubscriptionResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _namespaceTopicEventSubscriptionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NamespaceTopicEventSubscriptionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NamespaceTopicEventSubscriptionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName} + /// + /// + /// Operation Id + /// NamespaceTopicEventSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _namespaceTopicEventSubscriptionClientDiagnostics.CreateScope("NamespaceTopicEventSubscriptionResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _namespaceTopicEventSubscriptionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new NamespaceTopicEventSubscriptionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NamespaceTopicEventSubscriptionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicResource.cs index bd2b2c2fe1aa..feb79e3d89bd 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicResource.cs @@ -109,7 +109,7 @@ public virtual NamespaceTopicEventSubscriptionCollection GetNamespaceTopicEventS /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetNamespaceTop /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -335,7 +335,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -427,7 +427,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -465,7 +465,7 @@ public virtual async Task> GetSharedAccessKeysAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -503,7 +503,7 @@ public virtual Response GetSharedAccessKeys(CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -549,7 +549,7 @@ public virtual async Task> RegenerateKeyAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs new file mode 100644 index 000000000000..6a395b5723c2 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.EventGrid.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.EventGrid +{ + public partial class NetworkSecurityPerimeterConfigurationData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(ProvisioningIssues)) + { + writer.WritePropertyName("provisioningIssues"u8); + writer.WriteStartArray(); + foreach (var item in ProvisioningIssues) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NetworkSecurityPerimeter)) + { + writer.WritePropertyName("networkSecurityPerimeter"u8); + writer.WriteObjectValue(NetworkSecurityPerimeter, options); + } + if (Optional.IsDefined(ResourceAssociation)) + { + writer.WritePropertyName("resourceAssociation"u8); + writer.WriteObjectValue(ResourceAssociation, options); + } + if (Optional.IsDefined(Profile)) + { + writer.WritePropertyName("profile"u8); + writer.WriteObjectValue(Profile, options); + } + writer.WriteEndObject(); + } + + NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement, options); + } + + internal static NetworkSecurityPerimeterConfigurationData DeserializeNetworkSecurityPerimeterConfigurationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + NetworkSecurityPerimeterConfigProvisioningState? provisioningState = default; + IList provisioningIssues = default; + NetworkSecurityPerimeterInfo networkSecurityPerimeter = default; + ResourceAssociation resourceAssociation = default; + NetworkSecurityPerimeterConfigurationProfile profile = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NetworkSecurityPerimeterConfigProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("provisioningIssues"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(NetworkSecurityPerimeterConfigurationIssues.DeserializeNetworkSecurityPerimeterConfigurationIssues(item, options)); + } + provisioningIssues = array; + continue; + } + if (property0.NameEquals("networkSecurityPerimeter"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkSecurityPerimeter = NetworkSecurityPerimeterInfo.DeserializeNetworkSecurityPerimeterInfo(property0.Value, options); + continue; + } + if (property0.NameEquals("resourceAssociation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceAssociation = ResourceAssociation.DeserializeResourceAssociation(property0.Value, options); + continue; + } + if (property0.NameEquals("profile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + profile = NetworkSecurityPerimeterConfigurationProfile.DeserializeNetworkSecurityPerimeterConfigurationProfile(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeterConfigurationData( + id, + name, + type, + systemData, + provisioningState, + provisioningIssues ?? new ChangeTrackingList(), + networkSecurityPerimeter, + resourceAssociation, + profile, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningIssues), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningIssues: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ProvisioningIssues)) + { + if (ProvisioningIssues.Any()) + { + builder.Append(" provisioningIssues: "); + builder.AppendLine("["); + foreach (var item in ProvisioningIssues) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " provisioningIssues: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkSecurityPerimeter), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkSecurityPerimeter: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkSecurityPerimeter)) + { + builder.Append(" networkSecurityPerimeter: "); + BicepSerializationHelpers.AppendChildObject(builder, NetworkSecurityPerimeter, options, 4, false, " networkSecurityPerimeter: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceAssociation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceAssociation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceAssociation)) + { + builder.Append(" resourceAssociation: "); + BicepSerializationHelpers.AppendChildObject(builder, ResourceAssociation, options, 4, false, " resourceAssociation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Profile), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" profile: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Profile)) + { + builder.Append(" profile: "); + BicepSerializationHelpers.AppendChildObject(builder, Profile, options, 4, false, " profile: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.cs new file mode 100644 index 000000000000..6635fad6d20c --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.EventGrid.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.EventGrid +{ + /// + /// A class representing the NetworkSecurityPerimeterConfiguration data model. + /// Network security perimeter configuration. + /// + public partial class NetworkSecurityPerimeterConfigurationData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkSecurityPerimeterConfigurationData() + { + ProvisioningIssues = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning state to reflect configuration state and indicate status of nsp profile configuration retrieval. + /// Provisioning issues to reflect status when attempting to retrieve nsp profile configuration. + /// Perimeter info for nsp association. + /// Nsp association name and access mode of association. + /// Nsp profile configuration, access rules and diagnostic settings. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NetworkSecurityPerimeterConfigProvisioningState? provisioningState, IList provisioningIssues, NetworkSecurityPerimeterInfo networkSecurityPerimeter, ResourceAssociation resourceAssociation, NetworkSecurityPerimeterConfigurationProfile profile, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ProvisioningState = provisioningState; + ProvisioningIssues = provisioningIssues; + NetworkSecurityPerimeter = networkSecurityPerimeter; + ResourceAssociation = resourceAssociation; + Profile = profile; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Provisioning state to reflect configuration state and indicate status of nsp profile configuration retrieval. + [WirePath("properties.provisioningState")] + public NetworkSecurityPerimeterConfigProvisioningState? ProvisioningState { get; set; } + /// Provisioning issues to reflect status when attempting to retrieve nsp profile configuration. + [WirePath("properties.provisioningIssues")] + public IList ProvisioningIssues { get; } + /// Perimeter info for nsp association. + [WirePath("properties.networkSecurityPerimeter")] + public NetworkSecurityPerimeterInfo NetworkSecurityPerimeter { get; set; } + /// Nsp association name and access mode of association. + [WirePath("properties.resourceAssociation")] + public ResourceAssociation ResourceAssociation { get; set; } + /// Nsp profile configuration, access rules and diagnostic settings. + [WirePath("properties.profile")] + public NetworkSecurityPerimeterConfigurationProfile Profile { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationResource.cs index c6360660a771..4d13a0bb6290 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -492,7 +492,7 @@ public virtual async Task> AuthorizePartn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -534,7 +534,7 @@ public virtual Response AuthorizePartner(EventGrid /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -576,7 +576,7 @@ public virtual async Task> UnauthorizePar /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -618,7 +618,7 @@ public virtual Response UnauthorizePartner(EventGr /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -680,7 +680,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -742,7 +742,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -799,7 +799,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -856,7 +856,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -916,7 +916,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationCollection.cs new file mode 100644 index 000000000000..8838d231ad96 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationCollection.cs @@ -0,0 +1,498 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.EventGrid +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetPartnerDestinations method from an instance of . + /// + public partial class PartnerDestinationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _partnerDestinationClientDiagnostics; + private readonly PartnerDestinationsRestOperations _partnerDestinationRestClient; + + /// Initializes a new instance of the class for mocking. + protected PartnerDestinationCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal PartnerDestinationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _partnerDestinationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", PartnerDestinationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PartnerDestinationResource.ResourceType, out string partnerDestinationApiVersion); + _partnerDestinationRestClient = new PartnerDestinationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, partnerDestinationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Asynchronously creates a new partner destination with the specified parameters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the partner destination. + /// Partner destination create information. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string partnerDestinationName, PartnerDestinationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _partnerDestinationRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, partnerDestinationName, data, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(new PartnerDestinationOperationSource(Client), _partnerDestinationClientDiagnostics, Pipeline, _partnerDestinationRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, partnerDestinationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Asynchronously creates a new partner destination with the specified parameters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the partner destination. + /// Partner destination create information. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string partnerDestinationName, PartnerDestinationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _partnerDestinationRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, partnerDestinationName, data, cancellationToken); + var operation = new EventGridArmOperation(new PartnerDestinationOperationSource(Client), _partnerDestinationClientDiagnostics, Pipeline, _partnerDestinationRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, partnerDestinationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get properties of a partner destination. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the partner destination. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationCollection.Get"); + scope.Start(); + try + { + var response = await _partnerDestinationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, partnerDestinationName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PartnerDestinationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get properties of a partner destination. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the partner destination. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationCollection.Get"); + scope.Start(); + try + { + var response = _partnerDestinationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, partnerDestinationName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PartnerDestinationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all the partner destinations under a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations + /// + /// + /// Operation Id + /// PartnerDestinations_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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'. + /// 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. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _partnerDestinationRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _partnerDestinationRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PartnerDestinationResource(Client, PartnerDestinationData.DeserializePartnerDestinationData(e)), _partnerDestinationClientDiagnostics, Pipeline, "PartnerDestinationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List all the partner destinations under a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations + /// + /// + /// Operation Id + /// PartnerDestinations_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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'. + /// 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. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _partnerDestinationRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _partnerDestinationRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PartnerDestinationResource(Client, PartnerDestinationData.DeserializePartnerDestinationData(e)), _partnerDestinationClientDiagnostics, Pipeline, "PartnerDestinationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the partner destination. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationCollection.Exists"); + scope.Start(); + try + { + var response = await _partnerDestinationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, partnerDestinationName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the partner destination. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationCollection.Exists"); + scope.Start(); + try + { + var response = _partnerDestinationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, partnerDestinationName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the partner destination. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _partnerDestinationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, partnerDestinationName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PartnerDestinationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the partner destination. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationCollection.GetIfExists"); + scope.Start(); + try + { + var response = _partnerDestinationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, partnerDestinationName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PartnerDestinationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs new file mode 100644 index 000000000000..cf949366fa49 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs @@ -0,0 +1,527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.EventGrid.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.EventGrid +{ + public partial class PartnerDestinationData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerDestinationData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(PartnerRegistrationImmutableId)) + { + writer.WritePropertyName("partnerRegistrationImmutableId"u8); + writer.WriteStringValue(PartnerRegistrationImmutableId.Value); + } + if (Optional.IsDefined(EndpointServiceContext)) + { + writer.WritePropertyName("endpointServiceContext"u8); + writer.WriteStringValue(EndpointServiceContext); + } + if (Optional.IsDefined(ExpirationTimeIfNotActivatedUtc)) + { + writer.WritePropertyName("expirationTimeIfNotActivatedUtc"u8); + writer.WriteStringValue(ExpirationTimeIfNotActivatedUtc.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(ActivationState)) + { + writer.WritePropertyName("activationState"u8); + writer.WriteStringValue(ActivationState.Value.ToString()); + } + if (Optional.IsDefined(EndpointBaseUri)) + { + writer.WritePropertyName("endpointBaseUrl"u8); + writer.WriteStringValue(EndpointBaseUri.AbsoluteUri); + } + if (Optional.IsDefined(MessageForActivation)) + { + writer.WritePropertyName("messageForActivation"u8); + writer.WriteStringValue(MessageForActivation); + } + writer.WriteEndObject(); + } + + PartnerDestinationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerDestinationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerDestinationData(document.RootElement, options); + } + + internal static PartnerDestinationData DeserializePartnerDestinationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + Guid? partnerRegistrationImmutableId = default; + string endpointServiceContext = default; + DateTimeOffset? expirationTimeIfNotActivatedUtc = default; + PartnerDestinationProvisioningState? provisioningState = default; + PartnerDestinationActivationState? activationState = default; + Uri endpointBaseUri = default; + string messageForActivation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("partnerRegistrationImmutableId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerRegistrationImmutableId = property0.Value.GetGuid(); + continue; + } + if (property0.NameEquals("endpointServiceContext"u8)) + { + endpointServiceContext = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("expirationTimeIfNotActivatedUtc"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationTimeIfNotActivatedUtc = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new PartnerDestinationProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("activationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activationState = new PartnerDestinationActivationState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("endpointBaseUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointBaseUri = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("messageForActivation"u8)) + { + messageForActivation = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PartnerDestinationData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + partnerRegistrationImmutableId, + endpointServiceContext, + expirationTimeIfNotActivatedUtc, + provisioningState, + activationState, + endpointBaseUri, + messageForActivation, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartnerRegistrationImmutableId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" partnerRegistrationImmutableId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PartnerRegistrationImmutableId)) + { + builder.Append(" partnerRegistrationImmutableId: "); + builder.AppendLine($"'{PartnerRegistrationImmutableId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointServiceContext), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointServiceContext: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointServiceContext)) + { + builder.Append(" endpointServiceContext: "); + if (EndpointServiceContext.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EndpointServiceContext}'''"); + } + else + { + builder.AppendLine($"'{EndpointServiceContext}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExpirationTimeIfNotActivatedUtc), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" expirationTimeIfNotActivatedUtc: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExpirationTimeIfNotActivatedUtc)) + { + builder.Append(" expirationTimeIfNotActivatedUtc: "); + var formattedDateTimeString = TypeFormatters.ToString(ExpirationTimeIfNotActivatedUtc.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActivationState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" activationState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ActivationState)) + { + builder.Append(" activationState: "); + builder.AppendLine($"'{ActivationState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointBaseUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointBaseUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointBaseUri)) + { + builder.Append(" endpointBaseUrl: "); + builder.AppendLine($"'{EndpointBaseUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MessageForActivation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" messageForActivation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MessageForActivation)) + { + builder.Append(" messageForActivation: "); + if (MessageForActivation.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MessageForActivation}'''"); + } + else + { + builder.AppendLine($"'{MessageForActivation}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PartnerDestinationData)} does not support writing '{options.Format}' format."); + } + } + + PartnerDestinationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerDestinationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerDestinationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.cs new file mode 100644 index 000000000000..ad13c41f83b8 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.EventGrid.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.EventGrid +{ + /// + /// A class representing the PartnerDestination data model. + /// Event Grid Partner Destination. + /// + public partial class PartnerDestinationData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public PartnerDestinationData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The immutable Id of the corresponding partner registration. + /// Endpoint context associated with this partner destination. + /// + /// 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. + /// + /// Provisioning state of the partner destination. + /// Activation state of the partner destination. + /// Endpoint Base URL of the partner destination. + /// Context or helpful message that can be used during the approval process. + /// Keeps track of any properties unknown to the library. + internal PartnerDestinationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, Guid? partnerRegistrationImmutableId, string endpointServiceContext, DateTimeOffset? expirationTimeIfNotActivatedUtc, PartnerDestinationProvisioningState? provisioningState, PartnerDestinationActivationState? activationState, Uri endpointBaseUri, string messageForActivation, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + PartnerRegistrationImmutableId = partnerRegistrationImmutableId; + EndpointServiceContext = endpointServiceContext; + ExpirationTimeIfNotActivatedUtc = expirationTimeIfNotActivatedUtc; + ProvisioningState = provisioningState; + ActivationState = activationState; + EndpointBaseUri = endpointBaseUri; + MessageForActivation = messageForActivation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PartnerDestinationData() + { + } + + /// The immutable Id of the corresponding partner registration. + [WirePath("properties.partnerRegistrationImmutableId")] + public Guid? PartnerRegistrationImmutableId { get; set; } + /// Endpoint context associated with this partner destination. + [WirePath("properties.endpointServiceContext")] + public string EndpointServiceContext { get; set; } + /// + /// 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. + /// + [WirePath("properties.expirationTimeIfNotActivatedUtc")] + public DateTimeOffset? ExpirationTimeIfNotActivatedUtc { get; set; } + /// Provisioning state of the partner destination. + [WirePath("properties.provisioningState")] + public PartnerDestinationProvisioningState? ProvisioningState { get; } + /// Activation state of the partner destination. + [WirePath("properties.activationState")] + public PartnerDestinationActivationState? ActivationState { get; set; } + /// Endpoint Base URL of the partner destination. + [WirePath("properties.endpointBaseUrl")] + public Uri EndpointBaseUri { get; set; } + /// Context or helpful message that can be used during the approval process. + [WirePath("properties.messageForActivation")] + public string MessageForActivation { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationResource.Serialization.cs new file mode 100644 index 000000000000..c515d437f917 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.EventGrid +{ + public partial class PartnerDestinationResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PartnerDestinationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + PartnerDestinationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationResource.cs new file mode 100644 index 000000000000..81a5f2cc9202 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationResource.cs @@ -0,0 +1,783 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.EventGrid.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.EventGrid +{ + /// + /// A Class representing a PartnerDestination along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetPartnerDestinationResource method. + /// Otherwise you can get one from its parent resource using the GetPartnerDestination method. + /// + public partial class PartnerDestinationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The partnerDestinationName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string partnerDestinationName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _partnerDestinationClientDiagnostics; + private readonly PartnerDestinationsRestOperations _partnerDestinationRestClient; + private readonly PartnerDestinationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.EventGrid/partnerDestinations"; + + /// Initializes a new instance of the class for mocking. + protected PartnerDestinationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PartnerDestinationResource(ArmClient client, PartnerDestinationData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal PartnerDestinationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _partnerDestinationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string partnerDestinationApiVersion); + _partnerDestinationRestClient = new PartnerDestinationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, partnerDestinationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual PartnerDestinationData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get properties of a partner destination. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.Get"); + scope.Start(); + try + { + var response = await _partnerDestinationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PartnerDestinationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get properties of a partner destination. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.Get"); + scope.Start(); + try + { + var response = _partnerDestinationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PartnerDestinationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete existing partner destination. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Delete + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.Delete"); + scope.Start(); + try + { + var response = await _partnerDestinationRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(_partnerDestinationClientDiagnostics, Pipeline, _partnerDestinationRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete existing partner destination. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Delete + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.Delete"); + scope.Start(); + try + { + var response = _partnerDestinationRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new EventGridArmOperation(_partnerDestinationClientDiagnostics, Pipeline, _partnerDestinationRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Asynchronously updates a partner destination with the specified parameters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Update + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Partner destination update information. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PartnerDestinationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.Update"); + scope.Start(); + try + { + var response = await _partnerDestinationRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(new PartnerDestinationOperationSource(Client), _partnerDestinationClientDiagnostics, Pipeline, _partnerDestinationRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Asynchronously updates a partner destination with the specified parameters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Update + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Partner destination update information. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PartnerDestinationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.Update"); + scope.Start(); + try + { + var response = _partnerDestinationRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new EventGridArmOperation(new PartnerDestinationOperationSource(Client), _partnerDestinationClientDiagnostics, Pipeline, _partnerDestinationRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Activate a newly created partner destination. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}/activate + /// + /// + /// Operation Id + /// PartnerDestinations_Activate + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> ActivateAsync(CancellationToken cancellationToken = default) + { + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.Activate"); + scope.Start(); + try + { + var response = await _partnerDestinationRestClient.ActivateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PartnerDestinationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Activate a newly created partner destination. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}/activate + /// + /// + /// Operation Id + /// PartnerDestinations_Activate + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Activate(CancellationToken cancellationToken = default) + { + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.Activate"); + scope.Start(); + try + { + var response = _partnerDestinationRestClient.Activate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new PartnerDestinationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _partnerDestinationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PartnerDestinationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PartnerDestinationPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _partnerDestinationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new PartnerDestinationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PartnerDestinationPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _partnerDestinationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PartnerDestinationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PartnerDestinationPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _partnerDestinationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new PartnerDestinationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PartnerDestinationPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _partnerDestinationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PartnerDestinationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PartnerDestinationPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName} + /// + /// + /// Operation Id + /// PartnerDestinations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _partnerDestinationClientDiagnostics.CreateScope("PartnerDestinationResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _partnerDestinationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new PartnerDestinationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PartnerDestinationPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelCollection.cs index fd61f76bbe6a..00ffb97d2568 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string channelName, /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string channelName, Cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string channelName, CancellationToken cance /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs index 2faf79b5b63f..ae66618cb580 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs @@ -50,6 +50,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("partnerTopicInfo"u8); writer.WriteObjectValue(PartnerTopicInfo, options); } + if (Optional.IsDefined(PartnerDestinationInfo)) + { + writer.WritePropertyName("partnerDestinationInfo"u8); + writer.WriteObjectValue(PartnerDestinationInfo, options); + } if (Optional.IsDefined(MessageForActivation)) { writer.WritePropertyName("messageForActivation"u8); @@ -99,6 +104,7 @@ internal static PartnerNamespaceChannelData DeserializePartnerNamespaceChannelDa SystemData systemData = default; PartnerNamespaceChannelType? channelType = default; PartnerTopicInfo partnerTopicInfo = default; + PartnerDestinationInfo partnerDestinationInfo = default; string messageForActivation = default; PartnerNamespaceChannelProvisioningState? provisioningState = default; PartnerTopicReadinessState? readinessState = default; @@ -158,6 +164,15 @@ internal static PartnerNamespaceChannelData DeserializePartnerNamespaceChannelDa partnerTopicInfo = PartnerTopicInfo.DeserializePartnerTopicInfo(property0.Value, options); continue; } + if (property0.NameEquals("partnerDestinationInfo"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerDestinationInfo = PartnerDestinationInfo.DeserializePartnerDestinationInfo(property0.Value, options); + continue; + } if (property0.NameEquals("messageForActivation"u8)) { messageForActivation = property0.Value.GetString(); @@ -206,6 +221,7 @@ internal static PartnerNamespaceChannelData DeserializePartnerNamespaceChannelDa systemData, channelType, partnerTopicInfo, + partnerDestinationInfo, messageForActivation, provisioningState, readinessState, @@ -309,6 +325,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartnerDestinationInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" partnerDestinationInfo: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PartnerDestinationInfo)) + { + builder.Append(" partnerDestinationInfo: "); + BicepSerializationHelpers.AppendChildObject(builder, PartnerDestinationInfo, options, 4, false, " partnerDestinationInfo: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MessageForActivation), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.cs index 43ba4dc5176c..9295d9dfc38b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.cs @@ -63,6 +63,11 @@ public PartnerNamespaceChannelData() /// The systemData. /// The type of the event channel which represents the direction flow of events. /// 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 PartnerDestination and represents information about the partner destination resource corresponding to the channel. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// /// Context or helpful message that can be used during the approval process by the subscriber. /// Provisioning state of the channel. /// The readiness state of the corresponding partner topic. @@ -71,10 +76,11 @@ public PartnerNamespaceChannelData() /// the channel and corresponding partner topic are deleted. /// /// Keeps track of any properties unknown to the library. - internal PartnerNamespaceChannelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PartnerNamespaceChannelType? channelType, PartnerTopicInfo partnerTopicInfo, string messageForActivation, PartnerNamespaceChannelProvisioningState? provisioningState, PartnerTopicReadinessState? readinessState, DateTimeOffset? expireOnIfNotActivated, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal PartnerNamespaceChannelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PartnerNamespaceChannelType? channelType, PartnerTopicInfo partnerTopicInfo, PartnerDestinationInfo partnerDestinationInfo, string messageForActivation, PartnerNamespaceChannelProvisioningState? provisioningState, PartnerTopicReadinessState? readinessState, DateTimeOffset? expireOnIfNotActivated, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ChannelType = channelType; PartnerTopicInfo = partnerTopicInfo; + PartnerDestinationInfo = partnerDestinationInfo; MessageForActivation = messageForActivation; ProvisioningState = provisioningState; ReadinessState = readinessState; @@ -88,6 +94,13 @@ internal PartnerNamespaceChannelData(ResourceIdentifier id, string name, Resourc /// This property should be populated when channelType is PartnerTopic and represents information about the partner topic resource corresponding to the channel. [WirePath("properties.partnerTopicInfo")] public PartnerTopicInfo PartnerTopicInfo { get; set; } + /// + /// This property should be populated when channelType is PartnerDestination and represents information about the partner destination resource corresponding to the channel. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + [WirePath("properties.partnerDestinationInfo")] + public PartnerDestinationInfo PartnerDestinationInfo { get; set; } /// Context or helpful message that can be used during the approval process by the subscriber. [WirePath("properties.messageForActivation")] public string MessageForActivation { get; set; } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelResource.cs index 7dad1dae3872..91f76310518d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -308,7 +308,7 @@ public virtual async Task UpdateAsync(PartnerNamespaceChannelPatch pat /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -350,7 +350,7 @@ public virtual Response Update(PartnerNamespaceChannelPatch patch, CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -388,7 +388,7 @@ public virtual async Task> GetFullUriAsync(Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceCollection.cs index ffb25e37f535..f6e90adc9062 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string pa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string partnerNamespaceNam /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(string filter = null, i /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string partnerNamespaceNam /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string partnerNamespaceName, CancellationTo /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.cs index 4a5a4e42dc1c..8ffe2284dcaf 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.cs @@ -79,7 +79,7 @@ public PartnerNamespaceData(AzureLocation location) : base(location) /// You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceProperties.InboundIpRules" /> /// /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. - /// 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 Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the partner namespace. /// /// 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. @@ -131,7 +131,7 @@ internal PartnerNamespaceData() /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. [WirePath("properties.inboundIpRules")] public IList InboundIPRules { get; } - /// 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 Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the partner namespace. [WirePath("properties.disableLocalAuth")] public bool? IsLocalAuthDisabled { get; set; } /// diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.cs index 560261866af2..96546a80cdad 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResourceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResourceCollection.cs index 5a0adb79a8ed..d0bf0a32fe83 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResourceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResourceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string privateL /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync(st /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -219,7 +219,7 @@ public virtual Pageable GetAll(string filte /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -262,7 +262,7 @@ public virtual async Task> ExistsAsync(string privateLinkResource /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Response Exists(string privateLinkResourceName, Cancellatio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceResource.cs index 837e39794ae8..a66cd2459f93 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceResource.cs @@ -110,7 +110,7 @@ public virtual PartnerNamespaceChannelCollection GetPartnerNamespaceChannels() /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetPartnerN /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual EventGridPartnerNamespacePrivateEndpointConnectionCollection GetE /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual PartnerNamespacePrivateLinkResourceCollection GetPartnerNamespace /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetPart /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response GetPartnerNamespace /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -390,7 +390,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -432,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -474,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -520,7 +520,7 @@ public virtual async Task UpdateAsync(WaitUntil waitUntil, Partner /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -566,7 +566,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, PartnerNamespacePatch pa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -604,7 +604,7 @@ public virtual async Task> GetSharedA /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -642,7 +642,7 @@ public virtual Response GetSharedAccessKeys(Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -684,7 +684,7 @@ public virtual async Task> Regenerate /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -726,7 +726,7 @@ public virtual Response RegenerateKey(PartnerN /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -788,7 +788,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -850,7 +850,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -907,7 +907,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -964,7 +964,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -1024,7 +1024,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationCollection.cs index 786fecab4dd3..411d6d3fe256 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string partnerRegistrat /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string fil /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(string filter = null /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string partnerRegistration /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string partnerRegistrationName, Cancellatio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationResource.cs index 848561cacd20..00a2f6cea14e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task UpdateAsync(WaitUntil waitUntil, Partner /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, PartnerRegistrationPatch /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -483,7 +483,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -657,7 +657,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicCollection.cs index ad6e3a656e6e..9aa831f2cb18 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string partne /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string partnerTopicName, Cance /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(string filter = n /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string partnerTopicName, C /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string partnerTopicName, CancellationToken /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionCollection.cs index c1022d79ed6a..67a36e5e4dfd 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string eventS /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(string fil /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string eventSubscriptionNa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string eventSubscriptionName, CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionResource.cs index 45fe2fce69fb..36e93873ab3d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> GetFullUriAsync(Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -435,7 +435,7 @@ public virtual Response GetFullUri(CancellationToken c /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -464,7 +464,7 @@ public virtual AsyncPageable GetDeliveryAttributesAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicResource.cs index f7d60dbfe6aa..1259d0da0f45 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicResource.cs @@ -110,7 +110,7 @@ public virtual PartnerTopicEventSubscriptionCollection GetPartnerTopicEventSubsc /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetPa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetPartnerTopicEv /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -378,7 +378,7 @@ public virtual async Task> UpdateAsync(PartnerTop /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Update(PartnerTopicPatch patch, Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> ActivateAsync(Cancella /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -496,7 +496,7 @@ public virtual Response Activate(CancellationToken cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> DeactivateAsync(Cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -572,7 +572,7 @@ public virtual Response Deactivate(CancellationToken cance /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -634,7 +634,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -696,7 +696,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -753,7 +753,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -810,7 +810,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -870,7 +870,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/CaCertificatesRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/CaCertificatesRestOperations.cs index 93fa21c2e156..e5ead61d7ca2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/CaCertificatesRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/CaCertificatesRestOperations.cs @@ -32,7 +32,7 @@ public CaCertificatesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ChannelsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ChannelsRestOperations.cs index 370eba9c6cf9..f9e2217aebb7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ChannelsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ChannelsRestOperations.cs @@ -32,7 +32,7 @@ public ChannelsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ClientGroupsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ClientGroupsRestOperations.cs index 0609db46d39b..fa489401af96 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ClientGroupsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ClientGroupsRestOperations.cs @@ -32,7 +32,7 @@ public ClientGroupsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ClientsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ClientsRestOperations.cs index 4de5bb6561ab..19ec76034f46 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ClientsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ClientsRestOperations.cs @@ -32,7 +32,7 @@ public ClientsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainEventSubscriptionsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainEventSubscriptionsRestOperations.cs index 79cfccddf1f9..d766410d4db9 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainEventSubscriptionsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainEventSubscriptionsRestOperations.cs @@ -32,7 +32,7 @@ public DomainEventSubscriptionsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainTopicEventSubscriptionsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainTopicEventSubscriptionsRestOperations.cs index 5ac75ba27d47..d88c62cffa27 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainTopicEventSubscriptionsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainTopicEventSubscriptionsRestOperations.cs @@ -32,10 +32,120 @@ public DomainTopicEventSubscriptionsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateGetDeliveryAttributesRequestUri(string subscriptionId, string resourceGroupName, string domainName, string topicName, string eventSubscriptionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendPath("/eventSubscriptions/", false); + uri.AppendPath(eventSubscriptionName, true); + uri.AppendPath("/getDeliveryAttributes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetDeliveryAttributesRequest(string subscriptionId, string resourceGroupName, string domainName, string topicName, string eventSubscriptionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendPath("/eventSubscriptions/", false); + uri.AppendPath(eventSubscriptionName, true); + uri.AppendPath("/getDeliveryAttributes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get all delivery attributes for an event subscription for domain topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the top level domain. + /// Name of the domain topic. + /// Name of the event subscription. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetDeliveryAttributesAsync(string subscriptionId, string resourceGroupName, string domainName, string topicName, string eventSubscriptionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + + using var message = CreateGetDeliveryAttributesRequest(subscriptionId, resourceGroupName, domainName, topicName, eventSubscriptionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeliveryAttributeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get all delivery attributes for an event subscription for domain topic. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the top level domain. + /// Name of the domain topic. + /// Name of the event subscription. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetDeliveryAttributes(string subscriptionId, string resourceGroupName, string domainName, string topicName, string eventSubscriptionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + + using var message = CreateGetDeliveryAttributesRequest(subscriptionId, resourceGroupName, domainName, topicName, eventSubscriptionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeliveryAttributeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string domainName, string topicName, string eventSubscriptionName) { var uri = new RawRequestUriBuilder(); @@ -695,116 +805,6 @@ public Response List(string subscriptionId, string } } - internal RequestUriBuilder CreateGetDeliveryAttributesRequestUri(string subscriptionId, string resourceGroupName, string domainName, string topicName, string eventSubscriptionName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EventGrid/domains/", false); - uri.AppendPath(domainName, true); - uri.AppendPath("/topics/", false); - uri.AppendPath(topicName, true); - uri.AppendPath("/eventSubscriptions/", false); - uri.AppendPath(eventSubscriptionName, true); - uri.AppendPath("/getDeliveryAttributes", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetDeliveryAttributesRequest(string subscriptionId, string resourceGroupName, string domainName, string topicName, string eventSubscriptionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EventGrid/domains/", false); - uri.AppendPath(domainName, true); - uri.AppendPath("/topics/", false); - uri.AppendPath(topicName, true); - uri.AppendPath("/eventSubscriptions/", false); - uri.AppendPath(eventSubscriptionName, true); - uri.AppendPath("/getDeliveryAttributes", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all delivery attributes for an event subscription for domain topic. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group within the user's subscription. - /// Name of the top level domain. - /// Name of the domain topic. - /// Name of the event subscription. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetDeliveryAttributesAsync(string subscriptionId, string resourceGroupName, string domainName, string topicName, string eventSubscriptionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); - Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); - - using var message = CreateGetDeliveryAttributesRequest(subscriptionId, resourceGroupName, domainName, topicName, eventSubscriptionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DeliveryAttributeListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all delivery attributes for an event subscription for domain topic. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group within the user's subscription. - /// Name of the top level domain. - /// Name of the domain topic. - /// Name of the event subscription. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response GetDeliveryAttributes(string subscriptionId, string resourceGroupName, string domainName, string topicName, string eventSubscriptionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); - Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); - - using var message = CreateGetDeliveryAttributesRequest(subscriptionId, resourceGroupName, domainName, topicName, eventSubscriptionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DeliveryAttributeListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string domainName, string topicName, string filter, int? top) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainTopicsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainTopicsRestOperations.cs index e6ecbab0a62a..4b1e676a6ae3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainTopicsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainTopicsRestOperations.cs @@ -32,7 +32,7 @@ public DomainTopicsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainsRestOperations.cs index f47bb082dbc0..13d7c0eb5edf 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/DomainsRestOperations.cs @@ -32,7 +32,7 @@ public DomainsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/EventSubscriptionsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/EventSubscriptionsRestOperations.cs index bae5ea15a7a3..017fed8d346e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/EventSubscriptionsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/EventSubscriptionsRestOperations.cs @@ -32,10 +32,96 @@ public EventSubscriptionsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateGetDeliveryAttributesRequestUri(string scope, string eventSubscriptionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.EventGrid/eventSubscriptions/", false); + uri.AppendPath(eventSubscriptionName, true); + uri.AppendPath("/getDeliveryAttributes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetDeliveryAttributesRequest(string scope, string eventSubscriptionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.EventGrid/eventSubscriptions/", false); + uri.AppendPath(eventSubscriptionName, true); + uri.AppendPath("/getDeliveryAttributes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get all delivery attributes for an event subscription. + /// 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. + /// Name of the event subscription. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetDeliveryAttributesAsync(string scope, string eventSubscriptionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + + using var message = CreateGetDeliveryAttributesRequest(scope, eventSubscriptionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeliveryAttributeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get all delivery attributes for an event subscription. + /// 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. + /// Name of the event subscription. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetDeliveryAttributes(string scope, string eventSubscriptionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + + using var message = CreateGetDeliveryAttributesRequest(scope, eventSubscriptionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeliveryAttributeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateGetRequestUri(string scope, string eventSubscriptionName) { var uri = new RawRequestUriBuilder(); @@ -1575,92 +1661,6 @@ public Response ListByDomainTopic(string subscript } } - internal RequestUriBuilder CreateGetDeliveryAttributesRequestUri(string scope, string eventSubscriptionName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(scope, false); - uri.AppendPath("/providers/Microsoft.EventGrid/eventSubscriptions/", false); - uri.AppendPath(eventSubscriptionName, true); - uri.AppendPath("/getDeliveryAttributes", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetDeliveryAttributesRequest(string scope, string eventSubscriptionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(scope, false); - uri.AppendPath("/providers/Microsoft.EventGrid/eventSubscriptions/", false); - uri.AppendPath(eventSubscriptionName, true); - uri.AppendPath("/getDeliveryAttributes", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all delivery attributes for an event subscription. - /// 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. - /// Name of the event subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> GetDeliveryAttributesAsync(string scope, string eventSubscriptionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(scope, nameof(scope)); - Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); - - using var message = CreateGetDeliveryAttributesRequest(scope, eventSubscriptionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DeliveryAttributeListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all delivery attributes for an event subscription. - /// 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. - /// Name of the event subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response GetDeliveryAttributes(string scope, string eventSubscriptionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(scope, nameof(scope)); - Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); - - using var message = CreateGetDeliveryAttributesRequest(scope, eventSubscriptionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DeliveryAttributeListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateListGlobalBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, string filter, int? top) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ExtensionTopicsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ExtensionTopicsRestOperations.cs index 7d36ed8dc3ee..214d26c09357 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ExtensionTopicsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/ExtensionTopicsRestOperations.cs @@ -31,7 +31,7 @@ public ExtensionTopicsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespaceTopicEventSubscriptionsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespaceTopicEventSubscriptionsRestOperations.cs index 77fd00927598..85f1880419e0 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespaceTopicEventSubscriptionsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespaceTopicEventSubscriptionsRestOperations.cs @@ -32,7 +32,7 @@ public NamespaceTopicEventSubscriptionsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespaceTopicsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespaceTopicsRestOperations.cs index 6f8fa290155c..6942f2491cbb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespaceTopicsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespaceTopicsRestOperations.cs @@ -32,7 +32,7 @@ public NamespaceTopicsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespacesRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespacesRestOperations.cs index 14c228944005..f40b1adaa4b3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespacesRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NamespacesRestOperations.cs @@ -32,7 +32,7 @@ public NamespacesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs new file mode 100644 index 000000000000..ea83987b79a5 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs @@ -0,0 +1,365 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.EventGrid.Models; + +namespace Azure.ResourceManager.EventGrid +{ + internal partial class NetworkSecurityPerimeterConfigurationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NetworkSecurityPerimeterConfigurationsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public NetworkSecurityPerimeterConfigurationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-04-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName, string perimeterGuid, string associationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/", false); + uri.AppendPath(resourceType.ToString(), true); + uri.AppendPath("/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); + uri.AppendPath(perimeterGuid, true); + uri.AppendPath(".", false); + uri.AppendPath(associationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName, string perimeterGuid, string associationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/", false); + uri.AppendPath(resourceType.ToString(), true); + uri.AppendPath("/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); + uri.AppendPath(perimeterGuid, true); + uri.AppendPath(".", false); + uri.AppendPath(associationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a specific network security perimeter configuration with a topic or domain. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// The type of the resource. This can be either \'topics\', or \'domains\'. + /// The name of the resource (namely, either, the topic name or domain name). + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName, string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceType, resourceName, perimeterGuid, associationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterConfigurationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkSecurityPerimeterConfigurationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a specific network security perimeter configuration with a topic or domain. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// The type of the resource. This can be either \'topics\', or \'domains\'. + /// The name of the resource (namely, either, the topic name or domain name). + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName, string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceType, resourceName, perimeterGuid, associationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterConfigurationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkSecurityPerimeterConfigurationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateReconcileRequestUri(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName, string perimeterGuid, string associationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/", false); + uri.AppendPath(resourceType.ToString(), true); + uri.AppendPath("/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); + uri.AppendPath(perimeterGuid, true); + uri.AppendPath(".", false); + uri.AppendPath(associationName, true); + uri.AppendPath("/reconcile", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateReconcileRequest(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName, string perimeterGuid, string associationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/", false); + uri.AppendPath(resourceType.ToString(), true); + uri.AppendPath("/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); + uri.AppendPath(perimeterGuid, true); + uri.AppendPath(".", false); + uri.AppendPath(associationName, true); + uri.AppendPath("/reconcile", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Reconcile a specific network security perimeter configuration for a given network security perimeter association with a topic or domain. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// The type of the resource. This can be either \'topics\' or \'domains\'. + /// The name of the resource (namely, either, the topic name or domain name). + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task ReconcileAsync(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName, string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var message = CreateReconcileRequest(subscriptionId, resourceGroupName, resourceType, resourceName, perimeterGuid, associationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Reconcile a specific network security perimeter configuration for a given network security perimeter association with a topic or domain. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// The type of the resource. This can be either \'topics\' or \'domains\'. + /// The name of the resource (namely, either, the topic name or domain name). + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Reconcile(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName, string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var message = CreateReconcileRequest(subscriptionId, resourceGroupName, resourceType, resourceName, perimeterGuid, associationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/", false); + uri.AppendPath(resourceType.ToString(), true); + uri.AppendPath("/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/", false); + uri.AppendPath(resourceType.ToString(), true); + uri.AppendPath("/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get all network security perimeter configurations associated with a topic or domain. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// The type of the resource. This can be either \'topics\' or \'domains\'. + /// The name of the resource (namely, either, the topic name or domain name). + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, resourceType, resourceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterConfigurationList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NetworkSecurityPerimeterConfigurationList.DeserializeNetworkSecurityPerimeterConfigurationList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get all network security perimeter configurations associated with a topic or domain. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// The type of the resource. This can be either \'topics\' or \'domains\'. + /// The name of the resource (namely, either, the topic name or domain name). + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, string resourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, resourceType, resourceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterConfigurationList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NetworkSecurityPerimeterConfigurationList.DeserializeNetworkSecurityPerimeterConfigurationList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerConfigurationsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerConfigurationsRestOperations.cs index 217adc2125d6..0444422d3934 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerConfigurationsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public PartnerConfigurationsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerDestinationsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerDestinationsRestOperations.cs new file mode 100644 index 000000000000..03287a1d48a9 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerDestinationsRestOperations.cs @@ -0,0 +1,869 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.EventGrid.Models; + +namespace Azure.ResourceManager.EventGrid +{ + internal partial class PartnerDestinationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PartnerDestinationsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PartnerDestinationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-04-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string partnerDestinationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations/", false); + uri.AppendPath(partnerDestinationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string partnerDestinationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations/", false); + uri.AppendPath(partnerDestinationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get properties of a partner destination. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the partner destination. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, partnerDestinationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PartnerDestinationData.DeserializePartnerDestinationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PartnerDestinationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get properties of a partner destination. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the partner destination. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, partnerDestinationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PartnerDestinationData.DeserializePartnerDestinationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PartnerDestinationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string partnerDestinationName, PartnerDestinationData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations/", false); + uri.AppendPath(partnerDestinationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string partnerDestinationName, PartnerDestinationData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations/", false); + uri.AppendPath(partnerDestinationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Asynchronously creates a new partner destination with the specified parameters. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the partner destination. + /// Partner destination create information. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string partnerDestinationName, PartnerDestinationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, partnerDestinationName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Asynchronously creates a new partner destination with the specified parameters. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the partner destination. + /// Partner destination create information. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string partnerDestinationName, PartnerDestinationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, partnerDestinationName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string partnerDestinationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations/", false); + uri.AppendPath(partnerDestinationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string partnerDestinationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations/", false); + uri.AppendPath(partnerDestinationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete existing partner destination. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the partner destination. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, partnerDestinationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete existing partner destination. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the partner destination. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, partnerDestinationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string partnerDestinationName, PartnerDestinationPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations/", false); + uri.AppendPath(partnerDestinationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string partnerDestinationName, PartnerDestinationPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations/", false); + uri.AppendPath(partnerDestinationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Asynchronously updates a partner destination with the specified parameters. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the partner destination. + /// Partner destination update information. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string partnerDestinationName, PartnerDestinationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, partnerDestinationName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Asynchronously updates a partner destination with the specified parameters. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the partner destination. + /// Partner destination update information. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string partnerDestinationName, PartnerDestinationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, partnerDestinationName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId, string filter, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string filter, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the partner destinations under an Azure subscription. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// 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'. + /// 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. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, filter, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PartnerDestinationsListResult.DeserializePartnerDestinationsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the partner destinations under an Azure subscription. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// 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'. + /// 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. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, filter, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PartnerDestinationsListResult.DeserializePartnerDestinationsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName, string filter, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, string filter, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the partner destinations under a resource group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// 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'. + /// 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. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, filter, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PartnerDestinationsListResult.DeserializePartnerDestinationsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the partner destinations under a resource group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// 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'. + /// 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. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, filter, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PartnerDestinationsListResult.DeserializePartnerDestinationsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateActivateRequestUri(string subscriptionId, string resourceGroupName, string partnerDestinationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations/", false); + uri.AppendPath(partnerDestinationName, true); + uri.AppendPath("/activate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateActivateRequest(string subscriptionId, string resourceGroupName, string partnerDestinationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/partnerDestinations/", false); + uri.AppendPath(partnerDestinationName, true); + uri.AppendPath("/activate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Activate a newly created partner destination. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the partner destination. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ActivateAsync(string subscriptionId, string resourceGroupName, string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var message = CreateActivateRequest(subscriptionId, resourceGroupName, partnerDestinationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PartnerDestinationData.DeserializePartnerDestinationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Activate a newly created partner destination. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the partner destination. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Activate(string subscriptionId, string resourceGroupName, string partnerDestinationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(partnerDestinationName, nameof(partnerDestinationName)); + + using var message = CreateActivateRequest(subscriptionId, resourceGroupName, partnerDestinationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PartnerDestinationData.DeserializePartnerDestinationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, string filter, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string filter, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the partner destinations under an Azure subscription. + /// The URL to the next page of results. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// 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'. + /// 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. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, filter, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PartnerDestinationsListResult.DeserializePartnerDestinationsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the partner destinations under an Azure subscription. + /// The URL to the next page of results. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// 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'. + /// 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. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, filter, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PartnerDestinationsListResult.DeserializePartnerDestinationsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string filter, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string filter, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the partner destinations under a resource group. + /// The URL to the next page of results. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// 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'. + /// 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. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PartnerDestinationsListResult.DeserializePartnerDestinationsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the partner destinations under a resource group. + /// The URL to the next page of results. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// 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'. + /// 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. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PartnerDestinationsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PartnerDestinationsListResult.DeserializePartnerDestinationsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerNamespacesRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerNamespacesRestOperations.cs index 78ff428c302f..ed7b81026256 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerNamespacesRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerNamespacesRestOperations.cs @@ -32,7 +32,7 @@ public PartnerNamespacesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerRegistrationsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerRegistrationsRestOperations.cs index 0898593d9e3b..93ca3afde15b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerRegistrationsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerRegistrationsRestOperations.cs @@ -32,7 +32,7 @@ public PartnerRegistrationsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerTopicEventSubscriptionsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerTopicEventSubscriptionsRestOperations.cs index d6fa3938e469..edca1d438b57 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerTopicEventSubscriptionsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerTopicEventSubscriptionsRestOperations.cs @@ -32,7 +32,7 @@ public PartnerTopicEventSubscriptionsRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerTopicsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerTopicsRestOperations.cs index d388a8ad648c..9a06cf593839 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerTopicsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PartnerTopicsRestOperations.cs @@ -32,7 +32,7 @@ public PartnerTopicsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PermissionBindingsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PermissionBindingsRestOperations.cs index 028ba08bf66e..6fdd8977bedb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PermissionBindingsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PermissionBindingsRestOperations.cs @@ -32,7 +32,7 @@ public PermissionBindingsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 82ad611ef38e..0edcafa02e09 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 29f9931ff00f..49b36ce8e489 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/SystemTopicEventSubscriptionsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/SystemTopicEventSubscriptionsRestOperations.cs index 9c686e17a1f1..c04ec76fee81 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/SystemTopicEventSubscriptionsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/SystemTopicEventSubscriptionsRestOperations.cs @@ -32,10 +32,112 @@ public SystemTopicEventSubscriptionsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateGetDeliveryAttributesRequestUri(string subscriptionId, string resourceGroupName, string systemTopicName, string eventSubscriptionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/systemTopics/", false); + uri.AppendPath(systemTopicName, true); + uri.AppendPath("/eventSubscriptions/", false); + uri.AppendPath(eventSubscriptionName, true); + uri.AppendPath("/getDeliveryAttributes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetDeliveryAttributesRequest(string subscriptionId, string resourceGroupName, string systemTopicName, string eventSubscriptionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EventGrid/systemTopics/", false); + uri.AppendPath(systemTopicName, true); + uri.AppendPath("/eventSubscriptions/", false); + uri.AppendPath(eventSubscriptionName, true); + uri.AppendPath("/getDeliveryAttributes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get all delivery attributes for an event subscription. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the system topic. + /// Name of the event subscription. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetDeliveryAttributesAsync(string subscriptionId, string resourceGroupName, string systemTopicName, string eventSubscriptionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(systemTopicName, nameof(systemTopicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + + using var message = CreateGetDeliveryAttributesRequest(subscriptionId, resourceGroupName, systemTopicName, eventSubscriptionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeliveryAttributeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get all delivery attributes for an event subscription. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group within the user's subscription. + /// Name of the system topic. + /// Name of the event subscription. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetDeliveryAttributes(string subscriptionId, string resourceGroupName, string systemTopicName, string eventSubscriptionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(systemTopicName, nameof(systemTopicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + + using var message = CreateGetDeliveryAttributesRequest(subscriptionId, resourceGroupName, systemTopicName, eventSubscriptionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeliveryAttributeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string systemTopicName, string eventSubscriptionName) { var uri = new RawRequestUriBuilder(); @@ -645,108 +747,6 @@ public Response ListBySystemTopic(string subscript } } - internal RequestUriBuilder CreateGetDeliveryAttributesRequestUri(string subscriptionId, string resourceGroupName, string systemTopicName, string eventSubscriptionName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EventGrid/systemTopics/", false); - uri.AppendPath(systemTopicName, true); - uri.AppendPath("/eventSubscriptions/", false); - uri.AppendPath(eventSubscriptionName, true); - uri.AppendPath("/getDeliveryAttributes", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetDeliveryAttributesRequest(string subscriptionId, string resourceGroupName, string systemTopicName, string eventSubscriptionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EventGrid/systemTopics/", false); - uri.AppendPath(systemTopicName, true); - uri.AppendPath("/eventSubscriptions/", false); - uri.AppendPath(eventSubscriptionName, true); - uri.AppendPath("/getDeliveryAttributes", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all delivery attributes for an event subscription. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group within the user's subscription. - /// Name of the system topic. - /// Name of the event subscription. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetDeliveryAttributesAsync(string subscriptionId, string resourceGroupName, string systemTopicName, string eventSubscriptionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(systemTopicName, nameof(systemTopicName)); - Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); - - using var message = CreateGetDeliveryAttributesRequest(subscriptionId, resourceGroupName, systemTopicName, eventSubscriptionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DeliveryAttributeListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all delivery attributes for an event subscription. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group within the user's subscription. - /// Name of the system topic. - /// Name of the event subscription. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetDeliveryAttributes(string subscriptionId, string resourceGroupName, string systemTopicName, string eventSubscriptionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(systemTopicName, nameof(systemTopicName)); - Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); - - using var message = CreateGetDeliveryAttributesRequest(subscriptionId, resourceGroupName, systemTopicName, eventSubscriptionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DeliveryAttributeListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DeliveryAttributeListResult.DeserializeDeliveryAttributeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateListBySystemTopicNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string systemTopicName, string filter, int? top) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/SystemTopicsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/SystemTopicsRestOperations.cs index 04ce23e08616..2657a90315e8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/SystemTopicsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/SystemTopicsRestOperations.cs @@ -32,7 +32,7 @@ public SystemTopicsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicEventSubscriptionsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicEventSubscriptionsRestOperations.cs index 039f11653afb..b5b5f886685e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicEventSubscriptionsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicEventSubscriptionsRestOperations.cs @@ -32,7 +32,7 @@ public TopicEventSubscriptionsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicSpacesRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicSpacesRestOperations.cs index fcb3e584c9b5..1531809d4107 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicSpacesRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicSpacesRestOperations.cs @@ -32,7 +32,7 @@ public TopicSpacesRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicTypesRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicTypesRestOperations.cs index 865ebc826656..d4ef717c1b45 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicTypesRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicTypesRestOperations.cs @@ -32,7 +32,7 @@ public TopicTypesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicsRestOperations.cs index 3edebca178c4..e46a5a33d664 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/TopicsRestOperations.cs @@ -32,7 +32,7 @@ public TopicsRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/VerifiedPartnersRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/VerifiedPartnersRestOperations.cs index b8a3311ad3b8..22a5eb44ef63 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/VerifiedPartnersRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/VerifiedPartnersRestOperations.cs @@ -32,7 +32,7 @@ public VerifiedPartnersRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-15"; + _apiVersion = apiVersion ?? "2025-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicCollection.cs index a8b04da2335c..8b9555f9299e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string systemT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string systemTopicName, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string filter = nu /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(string filter = null, int? t /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string systemTopicName, Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string systemTopicName, CancellationToken c /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionCollection.cs index c4434b347649..21583f673093 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string eventSu /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(s /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(string filt /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string eventSubscriptionNa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string eventSubscriptionName, CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionResource.cs index 820061047374..c5767d0de6db 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -347,19 +347,19 @@ public virtual ArmOperation Update(WaitUnt } /// - /// Get the full endpoint URL for an event subscription of a system topic. + /// Get all delivery attributes for an event subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes /// /// /// Operation Id - /// SystemTopicEventSubscriptions_GetFullUri + /// SystemTopicEventSubscriptions_GetDeliveryAttributes /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -368,36 +368,27 @@ public virtual ArmOperation Update(WaitUnt /// /// /// The cancellation token to use. - public virtual async Task> GetFullUriAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDeliveryAttributesAsync(CancellationToken cancellationToken = default) { - using var scope = _systemTopicEventSubscriptionClientDiagnostics.CreateScope("SystemTopicEventSubscriptionResource.GetFullUri"); - scope.Start(); - try - { - var response = await _systemTopicEventSubscriptionRestClient.GetFullUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _systemTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _systemTopicEventSubscriptionClientDiagnostics, Pipeline, "SystemTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); } /// - /// Get the full endpoint URL for an event subscription of a system topic. + /// Get all delivery attributes for an event subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes /// /// /// Operation Id - /// SystemTopicEventSubscriptions_GetFullUri + /// SystemTopicEventSubscriptions_GetDeliveryAttributes /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -406,36 +397,27 @@ public virtual async Task> GetFullUriAsync(Ca /// /// /// The cancellation token to use. - public virtual Response GetFullUri(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDeliveryAttributes(CancellationToken cancellationToken = default) { - using var scope = _systemTopicEventSubscriptionClientDiagnostics.CreateScope("SystemTopicEventSubscriptionResource.GetFullUri"); - scope.Start(); - try - { - var response = _systemTopicEventSubscriptionRestClient.GetFullUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _systemTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _systemTopicEventSubscriptionClientDiagnostics, Pipeline, "SystemTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); } /// - /// Get all delivery attributes for an event subscription. + /// Get the full endpoint URL for an event subscription of a system topic. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl /// /// /// Operation Id - /// SystemTopicEventSubscriptions_GetDeliveryAttributes + /// SystemTopicEventSubscriptions_GetFullUri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -444,27 +426,36 @@ public virtual Response GetFullUri(CancellationToken c /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDeliveryAttributesAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetFullUriAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _systemTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _systemTopicEventSubscriptionClientDiagnostics, Pipeline, "SystemTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); + using var scope = _systemTopicEventSubscriptionClientDiagnostics.CreateScope("SystemTopicEventSubscriptionResource.GetFullUri"); + scope.Start(); + try + { + var response = await _systemTopicEventSubscriptionRestClient.GetFullUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Get all delivery attributes for an event subscription. + /// Get the full endpoint URL for an event subscription of a system topic. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl /// /// /// Operation Id - /// SystemTopicEventSubscriptions_GetDeliveryAttributes + /// SystemTopicEventSubscriptions_GetFullUri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -473,11 +464,20 @@ public virtual AsyncPageable GetDeliveryAttributesAsyn /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDeliveryAttributes(CancellationToken cancellationToken = default) + public virtual Response GetFullUri(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _systemTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping(e), _systemTopicEventSubscriptionClientDiagnostics, Pipeline, "SystemTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken); + using var scope = _systemTopicEventSubscriptionClientDiagnostics.CreateScope("SystemTopicEventSubscriptionResource.GetFullUri"); + scope.Start(); + try + { + var response = _systemTopicEventSubscriptionRestClient.GetFullUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicResource.cs index 8d6613c9d741..59b5c273ef4b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicResource.cs @@ -110,7 +110,7 @@ public virtual SystemTopicEventSubscriptionCollection GetSystemTopicEventSubscri /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetSys /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetSystemTopicEven /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Sys /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -490,7 +490,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -552,7 +552,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -609,7 +609,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -666,7 +666,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -726,7 +726,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionCollection.cs index 1abf3e35703d..e4a39090afd6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string eventSubscrip /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(string filter = n /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string eventSubscriptionNa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string eventSubscriptionName, CancellationT /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionResource.cs index de9c8e4dcfce..b5dead442718 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil wai /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -388,7 +388,7 @@ public virtual AsyncPageable GetDeliveryAttributesAsyn /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -417,7 +417,7 @@ public virtual Pageable GetDeliveryAttributes(Cancella /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetFullUriAsync(Ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationCollection.cs new file mode 100644 index 000000000000..b828a82560b6 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationCollection.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.EventGrid.Models; + +namespace Azure.ResourceManager.EventGrid +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetTopicNetworkSecurityPerimeterConfigurations method from an instance of . + /// + public partial class TopicNetworkSecurityPerimeterConfigurationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics; + private readonly NetworkSecurityPerimeterConfigurationsRestOperations _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient; + private readonly ClientDiagnostics _networkSecurityPerimeterConfigurationsClientDiagnostics; + private readonly NetworkSecurityPerimeterConfigurationsRestOperations _networkSecurityPerimeterConfigurationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected TopicNetworkSecurityPerimeterConfigurationCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal TopicNetworkSecurityPerimeterConfigurationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", TopicNetworkSecurityPerimeterConfigurationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(TopicNetworkSecurityPerimeterConfigurationResource.ResourceType, out string topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsApiVersion); + _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient = new NetworkSecurityPerimeterConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsApiVersion); + _networkSecurityPerimeterConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _networkSecurityPerimeterConfigurationsRestClient = new NetworkSecurityPerimeterConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EventGridTopicResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EventGridTopicResource.ResourceType), nameof(id)); + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> GetAsync(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("TopicNetworkSecurityPerimeterConfigurationCollection.Get"); + scope.Start(); + try + { + var response = await _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, perimeterGuid, associationName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TopicNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response Get(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("TopicNetworkSecurityPerimeterConfigurationCollection.Get"); + scope.Start(); + try + { + var response = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, perimeterGuid, associationName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TopicNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get all network security perimeter configurations associated with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_List + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkSecurityPerimeterConfigurationsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(e), _networkSecurityPerimeterConfigurationsClientDiagnostics, Pipeline, "TopicNetworkSecurityPerimeterConfigurationCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Get all network security perimeter configurations associated with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_List + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkSecurityPerimeterConfigurationsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(e), _networkSecurityPerimeterConfigurationsClientDiagnostics, Pipeline, "TopicNetworkSecurityPerimeterConfigurationCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> ExistsAsync(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("TopicNetworkSecurityPerimeterConfigurationCollection.Exists"); + scope.Start(); + try + { + var response = await _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, perimeterGuid, associationName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response Exists(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("TopicNetworkSecurityPerimeterConfigurationCollection.Exists"); + scope.Start(); + try + { + var response = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, perimeterGuid, associationName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> GetIfExistsAsync(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("TopicNetworkSecurityPerimeterConfigurationCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, perimeterGuid, associationName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TopicNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Unique identifier for perimeter. + /// Association name to association network security perimeter resource to profile. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual NullableResponse GetIfExists(string perimeterGuid, string associationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(perimeterGuid, nameof(perimeterGuid)); + Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); + + using var scope = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("TopicNetworkSecurityPerimeterConfigurationCollection.GetIfExists"); + scope.Start(); + try + { + var response = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, perimeterGuid, associationName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TopicNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationResource.Serialization.cs new file mode 100644 index 000000000000..262f20db42aa --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.EventGrid +{ + public partial class TopicNetworkSecurityPerimeterConfigurationResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationResource.cs new file mode 100644 index 000000000000..00a4dbb84b2f --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicNetworkSecurityPerimeterConfigurationResource.cs @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.EventGrid.Models; + +namespace Azure.ResourceManager.EventGrid +{ + /// + /// A Class representing a TopicNetworkSecurityPerimeterConfiguration along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetTopicNetworkSecurityPerimeterConfigurationResource method. + /// Otherwise you can get one from its parent resource using the GetTopicNetworkSecurityPerimeterConfiguration method. + /// + public partial class TopicNetworkSecurityPerimeterConfigurationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The resourceName. + /// The perimeterGuid. + /// The associationName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName, string perimeterGuid, string associationName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}/./{associationName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics; + private readonly NetworkSecurityPerimeterConfigurationsRestOperations _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient; + private readonly NetworkSecurityPerimeterConfigurationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.EventGrid/topics/networkSecurityPerimeterConfigurations/."; + + /// Initializes a new instance of the class for mocking. + protected TopicNetworkSecurityPerimeterConfigurationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal TopicNetworkSecurityPerimeterConfigurationResource(ArmClient client, NetworkSecurityPerimeterConfigurationData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal TopicNetworkSecurityPerimeterConfigurationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsApiVersion); + _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient = new NetworkSecurityPerimeterConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NetworkSecurityPerimeterConfigurationData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("TopicNetworkSecurityPerimeterConfigurationResource.Get"); + scope.Start(); + try + { + var response = await _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TopicNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a specific network security perimeter configuration with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("TopicNetworkSecurityPerimeterConfigurationResource.Get"); + scope.Start(); + try + { + var response = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TopicNetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Reconcile a specific network security perimeter configuration for a given network security perimeter association with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName}/reconcile + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Reconcile + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ReconcileAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("TopicNetworkSecurityPerimeterConfigurationResource.Reconcile"); + scope.Start(); + try + { + var response = await _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.ReconcileAsync(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(new TopicNetworkSecurityPerimeterConfigurationOperationSource(Client), _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics, Pipeline, _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.CreateReconcileRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Reconcile a specific network security perimeter configuration for a given network security perimeter association with a topic or domain. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName}/reconcile + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Reconcile + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Reconcile(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics.CreateScope("TopicNetworkSecurityPerimeterConfigurationResource.Reconcile"); + scope.Start(); + try + { + var response = _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.Reconcile(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new EventGridArmOperation(new TopicNetworkSecurityPerimeterConfigurationOperationSource(Client), _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsClientDiagnostics, Pipeline, _topicNetworkSecurityPerimeterConfigurationNetworkSecurityPerimeterConfigurationsRestClient.CreateReconcileRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceCollection.cs index 324e519079e0..a0a986e0ba95 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string topicSpa /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string topicSpaceName, Cancellat /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(string filter = nul /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(string filter = null, int? to /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string topicSpaceName, Can /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string topicSpaceName, CancellationToken ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceResource.cs index 6216f1ba06ca..8a91ee5824bc 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeCollection.cs index c7bf1f7f8430..0658b409ab51 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync(string topicType /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string topicTypeName, Cancellatio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken ca /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -213,7 +213,7 @@ public virtual Pageable GetAll(CancellationToken cancellation /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual async Task> ExistsAsync(string topicTypeName, Canc /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -299,7 +299,7 @@ public virtual Response Exists(string topicTypeName, CancellationToken can /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeResource.cs index 00f445e2a2fa..f70a9b420d68 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual AsyncPageable GetEventTypesAsync(Cancellatio /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerCollection.cs index 0c2511c0c660..0b8561433ea8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync(string ver /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string verifiedPartnerName, /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -219,7 +219,7 @@ public virtual Pageable GetAll(string filter = null, in /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -262,7 +262,7 @@ public virtual async Task> ExistsAsync(string verifiedPartnerName /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Response Exists(string verifiedPartnerName, CancellationTok /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs index d7aad5b2e295..a982d32c385e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs @@ -60,6 +60,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("partnerTopicDetails"u8); writer.WriteObjectValue(PartnerTopicDetails, options); } + if (Optional.IsDefined(PartnerDestinationDetails)) + { + writer.WritePropertyName("partnerDestinationDetails"u8); + writer.WriteObjectValue(PartnerDestinationDetails, options); + } if (Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -96,6 +101,7 @@ internal static VerifiedPartnerData DeserializeVerifiedPartnerData(JsonElement e string organizationName = default; string partnerDisplayName = default; PartnerDetails partnerTopicDetails = default; + PartnerDetails partnerDestinationDetails = default; VerifiedPartnerProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -162,6 +168,15 @@ internal static VerifiedPartnerData DeserializeVerifiedPartnerData(JsonElement e partnerTopicDetails = PartnerDetails.DeserializePartnerDetails(property0.Value, options); continue; } + if (property0.NameEquals("partnerDestinationDetails"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerDestinationDetails = PartnerDetails.DeserializePartnerDetails(property0.Value, options); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -189,6 +204,7 @@ internal static VerifiedPartnerData DeserializeVerifiedPartnerData(JsonElement e organizationName, partnerDisplayName, partnerTopicDetails, + partnerDestinationDetails, provisioningState, serializedAdditionalRawData); } @@ -335,6 +351,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartnerDestinationDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" partnerDestinationDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PartnerDestinationDetails)) + { + builder.Append(" partnerDestinationDetails: "); + BicepSerializationHelpers.AppendChildObject(builder, PartnerDestinationDetails, options, 4, false, " partnerDestinationDetails: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.cs index 9bb2f793cc27..3df3d2c48585 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.cs @@ -65,14 +65,16 @@ public VerifiedPartnerData() /// Official name of the Partner. /// Display name of the verified partner. /// Details of the partner topic scenario. + /// Details of the partner destination scenario. /// Provisioning state of the verified partner. /// Keeps track of any properties unknown to the library. - internal VerifiedPartnerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Guid? partnerRegistrationImmutableId, string organizationName, string partnerDisplayName, PartnerDetails partnerTopicDetails, VerifiedPartnerProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal VerifiedPartnerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Guid? partnerRegistrationImmutableId, string organizationName, string partnerDisplayName, PartnerDetails partnerTopicDetails, PartnerDetails partnerDestinationDetails, VerifiedPartnerProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { PartnerRegistrationImmutableId = partnerRegistrationImmutableId; OrganizationName = organizationName; PartnerDisplayName = partnerDisplayName; PartnerTopicDetails = partnerTopicDetails; + PartnerDestinationDetails = partnerDestinationDetails; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -89,6 +91,9 @@ internal VerifiedPartnerData(ResourceIdentifier id, string name, ResourceType re /// Details of the partner topic scenario. [WirePath("properties.partnerTopicDetails")] public PartnerDetails PartnerTopicDetails { get; set; } + /// Details of the partner destination scenario. + [WirePath("properties.partnerDestinationDetails")] + public PartnerDetails PartnerDestinationDetails { get; set; } /// Provisioning state of the verified partner. [WirePath("properties.provisioningState")] public VerifiedPartnerProvisioningState? ProvisioningState { get; set; } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerResource.cs index d8e9639f2769..037e3e408749 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerResource.cs @@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2025-02-15 + /// 2025-04-01-preview /// /// /// Resource diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md index 67d0481ad744..f284ef706119 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: EventGrid namespace: Azure.ResourceManager.EventGrid -require: https://github.com/Azure/azure-rest-api-specs/blob/8a059231d92b10d87ffc3f18515516e84dae87cc/specification/eventgrid/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/eventgrid/resource-manager/readme.md #tag: package-2025-02 output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/pineconevectordb/ci.yml b/sdk/pineconevectordb/ci.yml deleted file mode 100644 index 0b8325c8c903..000000000000 --- a/sdk/pineconevectordb/ci.yml +++ /dev/null @@ -1,35 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: - branches: - include: - - main - - hotfix/* - - release/* - paths: - include: - - sdk/pineconevectordb - - sdk/pineconevectordb/ci.yml - - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/pineconevectordb - - sdk/pineconevectordb/ci.yml - - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: pineconevectordb - ArtifactName: packages - Artifacts: - - name: Azure.ResourceManager.PineconeVectorDb - safeName: AzureResourceManagerPineconeVectorDb diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..4e749e6b85b1 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -12,6 +12,8 @@ trigger: - sdk/storage/Azure.Storage.DataMovement/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/