diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md index b363935eebaf..6bd7d87e1d09 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md @@ -1,14 +1,875 @@ # Release History -## 1.2.0-beta.8 (Unreleased) +## 1.0.0-beta.1 (2025-02-08) -### Features Added +- Azure Resource Manager EventGrid client library for Java. This package contains Microsoft Azure SDK for EventGrid Management SDK. Azure EventGrid Management Client. Package tag package-2025-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.TopicTypePropertiesSupportedScopesForSourceItem` was removed + +#### `models.EventSubscription$DefinitionStages` was modified + +* `withExistingScope(java.lang.String)` was removed in stage 1 + +#### `models.EventSubscription$Definition` was modified + +* `withExistingScope(java.lang.String)` was removed + +#### `models.EventSubscriptions` was modified + +* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getById(java.lang.String)` was removed +* `define(java.lang.String)` was removed +* `deleteById(java.lang.String)` was removed +* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed + +### Features Added + +* `models.PermissionBinding$DefinitionStages` was added + +* `models.CaCertificates` was added + +* `models.Subscription$Definition` was added + +* `models.Namespace$UpdateStages` was added + +* `models.SkuName` was added + +* `models.DeliveryMode` was added + +* `models.Channels` was added + +* `models.PartnerNamespaceSharedAccessKeys` was added + +* `models.StringEndsWithFilter` was added + +* `models.Namespaces` was added + +* `models.InlineEventProperties` was added + +* `models.Channel` was added + +* `models.PartnerNamespace` was added + +* `models.PartnerConfiguration` was added + +* `models.Channel$UpdateStages` was added + +* `models.PartnerRegistration$UpdateStages` was added + +* `models.BoolEqualsFilter` was added + +* `models.UpdateTopicSpacesConfigurationInfo` was added + +* `models.DeliveryConfiguration` was added + +* `models.PartnerConfigurationUpdateParameters` was added + +* `models.TopicSpace$Update` was added + +* `models.CaCertificateProvisioningState` was added + +* `models.MonitorAlertSeverity` was added + +* `models.PermissionBinding$UpdateStages` was added + +* `models.UpdateTopicsConfigurationInfo` was added + +* `models.StringNotEndsWithFilter` was added + +* `models.PermissionType` was added + +* `models.FilterOperatorType` was added + +* `models.PermissionBindingProvisioningState` was added + +* `models.NumberLessThanFilter` was added + +* `models.StringNotBeginsWithFilter` was added + +* `models.PartnerTopic$Definition` was added + +* `models.DataResidencyBoundary` was added + +* `models.StringContainsFilter` was added + +* `models.Filter` was added + +* `models.SubscriptionsListResult` was added + +* `models.NamespaceTopicsListResult` was added + +* `models.NamespaceTopic$Update` was added + +* `models.StringNotInFilter` was added + +* `models.CaCertificate$Definition` was added + +* `models.CaCertificate$DefinitionStages` was added + +* `models.TopicSpaces` was added + +* `models.Namespace` was added + +* `models.ClientCertificateAuthentication` was added + +* `models.Client$Update` was added + +* `models.RoutingEnrichments` was added + +* `models.ClientGroups` was added + +* `models.NamespaceTopics` was added + +* `models.NamespaceTopicEventSubscriptions` was added + +* `models.NumberNotInFilter` was added + +* `models.TopicsConfiguration` was added + +* `models.PartnerConfigurations` was added + +* `models.PartnerRegistration$Definition` was added + +* `models.StringBeginsWithFilter` was added + +* `models.VerifiedPartners` was added + +* `models.TopicSpace` was added + +* `models.NamespaceSharedAccessKeys` was added + +* `models.PartnerTopicActivationState` was added + +* `models.TopicSpacesListResult` was added + +* `models.ClientGroup` was added + +* `models.PartnerRegistrationProvisioningState` was added + +* `models.TopicSpace$Definition` was added + +* `models.StringInFilter` was added + +* `models.CaCertificate$Update` was added + +* `models.TopicSpacesConfiguration` was added + +* `models.DomainEventSubscriptions` was added + +* `models.PartnerTopics` was added + +* `models.ChannelProvisioningState` was added + +* `models.NamespaceSku` was added + +* `models.ChannelsListResult` was added + +* `models.DeliverySchema` was added + +* `models.NumberInFilter` was added + +* `models.CaCertificate` was added + +* `models.PartnerRegistration` was added + +* `models.TopicSpaceProvisioningState` was added + +* `models.PartnerTopicRoutingMode` was added + +* `models.ClientGroupProvisioningState` was added + +* `models.TlsVersion` was added + +* `models.NumberLessThanOrEqualsFilter` was added + +* `models.PartnerTopicInfo` was added + +* `models.PartnerNamespace$DefinitionStages` was added + +* `models.Channel$Update` was added + +* `models.CaCertificatesListResult` was added + +* `models.StaticStringRoutingEnrichment` was added + +* `models.PartnerTopicProvisioningState` was added + +* `models.CustomDomainConfiguration` was added + +* `models.StringNotContainsFilter` was added + +* `models.PartnerTopic` was added + +* `models.EventDefinitionKind` was added + +* `models.PartnerNamespace$Definition` was added + +* `models.EventInputSchema` was added + +* `models.PartnerNamespaceRegenerateKeyRequest` was added + +* `models.NamespaceTopicProvisioningState` was added + +* `models.PartnerAuthorization` was added + +* `models.StaticRoutingEnrichmentType` was added + +* `models.VerifiedPartnersListResult` was added + +* `models.PartnerConfigurationProvisioningState` was added + +* `models.Subscription$Update` was added + +* `models.CaCertificate$UpdateStages` was added + +* `models.NamespaceTopic$Definition` was added + +* `models.NumberGreaterThanOrEqualsFilter` was added + +* `models.Clients` was added + +* `models.Subscription$DefinitionStages` was added + +* `models.CustomDomainValidationState` was added + +* `models.NamespacesListResult` was added + +* `models.PartnerNamespaces` was added + +* `models.TopicEventSubscriptions` was added + +* `models.DynamicRoutingEnrichment` was added + +* `models.Client` was added + +* `models.DomainTopicEventSubscriptions` was added + +* `models.TopicSpace$DefinitionStages` was added + +* `models.PermissionBindings` was added + +* `models.PartnerConfigurationsListResult` was added + +* `models.PartnerUpdateTopicInfo` was added + +* `models.PermissionBinding` was added + +* `models.NamespaceTopic` was added + +* `models.IsNotNullFilter` was added + +* `models.Namespace$Definition` was added + +* `models.ClientState` was added + +* `models.QueueInfo` was added + +* `models.PartnerRegistration$Update` was added + +* `models.PartnerTopicUpdateParameters` was added + +* `models.PushInfo` was added + +* `models.ClientProvisioningState` was added + +* `models.PartnerDetails` was added + +* `models.FiltersConfiguration` was added + +* `models.ClientGroup$UpdateStages` was added + +* `models.PermissionBinding$Update` was added + +* `models.RoutingIdentityType` was added + +* `models.CustomDomainOwnershipValidationResult` was added + +* `models.SubscriptionFullUrl` was added + +* `models.Namespace$Update` was added + +* `models.PartnerRegistration$DefinitionStages` was added + +* `models.Namespace$DefinitionStages` was added + +* `models.PublisherType` was added + +* `models.SubscriptionProvisioningState` was added + +* `models.PartnerTopicEventSubscriptions` was added + +* `models.NamespaceUpdateParameters` was added + +* `models.PartnerNamespace$Update` was added + +* `models.NumberGreaterThanFilter` was added + +* `models.NamespaceProvisioningState` was added + +* `models.TopicTypeAdditionalEnforcedPermission` was added + +* `models.PermissionBindingsListResult` was added + +* `models.ClientCertificateValidationScheme` was added + +* `models.ClientsListResult` was added + +* `models.MonitorAlertEventSubscriptionDestination` was added + +* `models.PartnerTopic$Update` was added + +* `models.EventTypeInfo` was added + +* `models.Subscription` was added + +* `models.PartnerNamespacesListResult` was added + +* `models.TopicSpace$UpdateStages` was added + +* `models.ClientGroupsListResult` was added + +* `models.Client$UpdateStages` was added + +* `models.NamespaceTopic$DefinitionStages` was added + +* `models.Client$DefinitionStages` was added + +* `models.Client$Definition` was added + +* `models.RoutingIdentityInfo` was added + +* `models.PartnerTopic$DefinitionStages` was added + +* `models.ReadinessState` was added + +* `models.NamespaceTopicEventSubscriptionDestination` was added + +* `models.ClientGroup$Update` was added + +* `models.PartnerNamespaceUpdateParameters` was added + +* `models.Channel$Definition` was added + +* `models.TopicSpacesConfigurationState` was added + +* `models.PartnerTopic$UpdateStages` was added + +* `models.ClientGroup$Definition` was added + +* `models.SubscriptionUpdateParameters` was added + +* `models.NamespaceTopic$UpdateStages` was added + +* `models.NamespaceTopicUpdateParameters` was added + +* `models.PartnerRegistrationsListResult` was added + +* `models.PartnerRegistrationUpdateParameters` was added + +* `models.Channel$DefinitionStages` was added + +* `models.VerifiedPartnerProvisioningState` was added + +* `models.CustomDomainIdentity` was added + +* `models.TopicTypeSourceScope` was added + +* `models.StaticRoutingEnrichment` was added + +* `models.CustomDomainIdentityType` was added + +* `models.NumberInRangeFilter` was added + +* `models.IsNullOrUndefinedFilter` was added + +* `models.Subscription$UpdateStages` was added + +* `models.ChannelType` was added + +* `models.ChannelUpdateParameters` was added + +* `models.PermissionBinding$Definition` was added + +* `models.NamespaceRegenerateKeyRequest` was added + +* `models.PartnerNamespaceProvisioningState` was added + +* `models.PartnerTopicsListResult` was added + +* `models.NumberNotInRangeFilter` was added + +* `models.PartnerRegistrations` was added + +* `models.VerifiedPartner` was added + +* `models.PartnerNamespace$UpdateStages` was added + +* `models.Partner` was added + +* `models.ClientGroup$DefinitionStages` was added + +#### `models.EventSubscriptionsListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.PrivateEndpoint` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.SystemTopic` was modified + +* `resourceGroupName()` was added + +#### `models.StringNotBeginsWithAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.ConnectionState` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.WebhookEventSubscriptionDestination` was modified + +* `minimumTlsVersionAllowed()` was added +* `endpointType()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.StringEndsWithAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.NumberInRangeAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.IsNotNullAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `operatorType()` was added + +#### `models.EventSubscription$Definition` was modified + +* `withExistingTopic(java.lang.String,java.lang.String)` was added + +#### `models.ServiceBusQueueEventSubscriptionDestination` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `endpointType()` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.PrivateEndpointConnectionListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.UserIdentityProperties` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.TopicUpdateParameters` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added +* `eventTypeInfo()` was added +* `withEventTypeInfo(models.EventTypeInfo)` was added +* `dataResidencyBoundary()` was added +* `withDataResidencyBoundary(models.DataResidencyBoundary)` was added +* `minimumTlsVersionAllowed()` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.IsNullOrUndefinedAdvancedFilter` was modified + +* `operatorType()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.OperationsListResult` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.Domain$Update` was modified + +* `withDataResidencyBoundary(models.DataResidencyBoundary)` was added +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added +* `withEventTypeInfo(models.EventTypeInfo)` was added + +#### `models.DomainsListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.Topic$Definition` was modified + +* `withEventTypeInfo(models.EventTypeInfo)` was added +* `withDataResidencyBoundary(models.DataResidencyBoundary)` was added +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added + +#### `models.StringBeginsWithAdvancedFilter` was modified + +* `operatorType()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.DeliveryAttributeMapping` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `type()` was added + +#### `models.DomainUpdateParameters` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `minimumTlsVersionAllowed()` was added +* `dataResidencyBoundary()` was added +* `withEventTypeInfo(models.EventTypeInfo)` was added +* `eventTypeInfo()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `withDataResidencyBoundary(models.DataResidencyBoundary)` was added +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added + +#### `models.StringNotEndsWithAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.NumberGreaterThanAdvancedFilter` was modified + +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.BoolEqualsAdvancedFilter` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added + +#### `models.StringNotInAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `operatorType()` was added + +#### `models.TopicsListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.Topic$Update` was modified + +* `withDataResidencyBoundary(models.DataResidencyBoundary)` was added +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added +* `withEventTypeInfo(models.EventTypeInfo)` was added + +#### `models.NumberLessThanAdvancedFilter` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `operatorType()` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.StaticDeliveryAttributeMapping` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `type()` was added + +#### `models.EventSubscriptionDestination` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `endpointType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.DomainTopicsListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.DeliveryWithResourceIdentity` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.EventSubscription` was modified + +* `resourceGroupName()` was added + +#### `models.AzureFunctionEventSubscriptionDestination` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `endpointType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.Domain` was modified + +* `dataResidencyBoundary()` was added +* `minimumTlsVersionAllowed()` was added +* `eventTypeInfo()` was added +* `resourceGroupName()` was added + +#### `models.DeadLetterDestination` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `endpointType()` was added + +#### `models.DynamicDeliveryAttributeMapping` was modified + +* `type()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.StorageBlobDeadLetterDestination` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `endpointType()` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.JsonField` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.EventSubscriptions` was modified + +* `update(java.lang.String,java.lang.String,models.EventSubscriptionUpdateParameters,com.azure.core.util.Context)` was added +* `update(java.lang.String,java.lang.String,models.EventSubscriptionUpdateParameters)` was added +* `createOrUpdate(java.lang.String,java.lang.String,fluent.models.EventSubscriptionInner)` was added +* `createOrUpdate(java.lang.String,java.lang.String,fluent.models.EventSubscriptionInner,com.azure.core.util.Context)` was added + +#### `EventGridManager` was modified + +* `caCertificates()` was added +* `namespaceTopicEventSubscriptions()` was added +* `domainTopicEventSubscriptions()` was added +* `clients()` was added +* `partnerTopicEventSubscriptions()` was added +* `permissionBindings()` was added +* `domainEventSubscriptions()` was added +* `authenticate(com.azure.core.http.HttpPipeline,com.azure.core.management.profile.AzureProfile)` was added +* `partnerNamespaces()` was added +* `clientGroups()` was added +* `partnerRegistrations()` was added +* `namespaceTopics()` was added +* `partnerConfigurations()` was added +* `namespaces()` was added +* `topicEventSubscriptions()` was added +* `verifiedPartners()` was added +* `partnerTopics()` was added +* `topicSpaces()` was added +* `channels()` was added + +#### `models.RetryPolicy` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.JsonInputSchemaMapping` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `inputSchemaMappingType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.EventTypesListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.EventSubscriptionIdentity` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.Topic` was modified + +* `resourceGroupName()` was added +* `dataResidencyBoundary()` was added +* `minimumTlsVersionAllowed()` was added +* `eventTypeInfo()` was added + +#### `models.EventSubscriptionFilter` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.InboundIpRule` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.DeadLetterWithResourceIdentity` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.PrivateLinkResourcesListResult` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.StorageQueueEventSubscriptionDestination` was modified + +* `endpointType()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.OperationInfo` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.StringInAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.StringContainsAdvancedFilter` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `operatorType()` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.DomainRegenerateKeyRequest` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.NumberNotInRangeAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.IdentityInfo` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.NumberNotInAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.ServiceBusTopicEventSubscriptionDestination` was modified + +* `endpointType()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.SystemTopicUpdateParameters` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.AdvancedFilter` was modified + +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.Operation` was modified + +* `isDataAction()` was added + +#### `models.TopicRegenerateKeyRequest` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.SystemTopicsListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.NumberGreaterThanOrEqualsAdvancedFilter` was modified + +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.HybridConnectionEventSubscriptionDestination` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `endpointType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.InputSchemaMapping` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `inputSchemaMappingType()` was added + +#### `models.TopicTypeInfo` was modified + +* `areRegionalAndGlobalSourcesSupported()` was added +* `additionalEnforcedPermissions()` was added + +#### `models.StringNotContainsAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.EventHubEventSubscriptionDestination` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `endpointType()` was added + +#### `models.TopicTypesListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.NumberLessThanOrEqualsAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `operatorType()` was added + +#### `models.Domain$Definition` was modified + +* `withEventTypeInfo(models.EventTypeInfo)` was added +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added +* `withDataResidencyBoundary(models.DataResidencyBoundary)` was added + +#### `models.JsonFieldWithDefault` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `EventGridManager$Configurable` was modified + +* `withRetryOptions(com.azure.core.http.policy.RetryOptions)` was added + +#### `models.NumberInAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.EventSubscriptionUpdateParameters` was modified -### Other Changes +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added ## 1.2.0-beta.7 (2024-12-04) diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md index 04787cc2ac2e..a5609bd0f140 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md @@ -2,7 +2,7 @@ Azure Resource Manager EventGrid client library for Java. -This package contains Microsoft Azure SDK for EventGrid Management SDK. Azure EventGrid Management Client. Package tag package-2024-06-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for EventGrid Management SDK. Azure EventGrid Management Client. Package tag package-2025-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-eventgrid - 1.2.0-beta.7 + 1.2.0-beta.8 ``` [//]: # ({x-version-update-end}) @@ -101,4 +101,4 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Feventgrid%2Fazure-resourcemanager-eventgrid%2FREADME.png) diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md index d9e23efe0d8b..bb996d209b7d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md @@ -124,12 +124,6 @@ - [Update](#namespaces_update) - [ValidateCustomDomainOwnership](#namespaces_validatecustomdomainownership) -## NetworkSecurityPerimeterConfigurations - -- [Get](#networksecurityperimeterconfigurations_get) -- [List](#networksecurityperimeterconfigurations_list) -- [Reconcile](#networksecurityperimeterconfigurations_reconcile) - ## Operations - [List](#operations_list) @@ -145,16 +139,6 @@ - [UnauthorizePartner](#partnerconfigurations_unauthorizepartner) - [Update](#partnerconfigurations_update) -## PartnerDestinations - -- [Activate](#partnerdestinations_activate) -- [CreateOrUpdate](#partnerdestinations_createorupdate) -- [Delete](#partnerdestinations_delete) -- [GetByResourceGroup](#partnerdestinations_getbyresourcegroup) -- [List](#partnerdestinations_list) -- [ListByResourceGroup](#partnerdestinations_listbyresourcegroup) -- [Update](#partnerdestinations_update) - ## PartnerNamespaces - [CreateOrUpdate](#partnernamespaces_createorupdate) @@ -281,8 +265,7 @@ */ public final class CaCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * CaCertificates_CreateOrUpdate.json */ /** @@ -310,8 +293,8 @@ public final class CaCertificatesCreateOrUpdateSamples { public final class CaCertificatesDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * CaCertificates_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_Delete. + * json */ /** * Sample code: CaCertificates_Delete. @@ -335,8 +318,7 @@ public final class CaCertificatesDeleteSamples { public final class CaCertificatesGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * CaCertificates_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_Get.json */ /** * Sample code: CaCertificates_Get. @@ -359,8 +341,7 @@ public final class CaCertificatesGetSamples { */ public final class CaCertificatesListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * CaCertificates_ListByNamespace.json */ /** @@ -388,8 +369,8 @@ import java.time.OffsetDateTime; public final class ChannelsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Channels_CreateOrUpdate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_CreateOrUpdate. + * json */ /** * Sample code: Channels_CreateOrUpdate. @@ -401,7 +382,7 @@ public final class ChannelsCreateOrUpdateSamples { .define("exampleChannelName1") .withExistingPartnerNamespace("examplerg", "examplePartnerNamespaceName1") .withChannelType(ChannelType.PARTNER_TOPIC) - .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("8f6b6269-84f2-4d09-9e31-1127efcd1e40") + .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("5b4b650e-28b9-4790-b3ab-ddbd88d727c4") .withResourceGroupName("examplerg2") .withName("examplePartnerTopic1") .withSource("ContosoCorp.Accounts.User1")) @@ -421,8 +402,7 @@ public final class ChannelsCreateOrUpdateSamples { public final class ChannelsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Delete. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Delete.json */ /** * Sample code: Channels_Delete. @@ -446,8 +426,7 @@ public final class ChannelsDeleteSamples { public final class ChannelsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Get. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Get.json */ /** * Sample code: Channels_Get. @@ -471,8 +450,7 @@ public final class ChannelsGetSamples { public final class ChannelsGetFullUrlSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Channels_GetFullUrl.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_GetFullUrl.json */ /** * Sample code: Channels_GetFullUrl. @@ -495,8 +473,7 @@ public final class ChannelsGetFullUrlSamples { */ public final class ChannelsListByPartnerNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Channels_ListByPartnerNamespace.json */ /** @@ -524,8 +501,7 @@ import java.time.OffsetDateTime; public final class ChannelsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Update. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Update.json */ /** * Sample code: Channels_Update. @@ -550,8 +526,7 @@ public final class ChannelsUpdateSamples { */ public final class ClientGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * ClientGroups_CreateOrUpdate.json */ /** @@ -579,8 +554,7 @@ public final class ClientGroupsCreateOrUpdateSamples { public final class ClientGroupsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * ClientGroups_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_Delete.json */ /** * Sample code: ClientGroups_Delete. @@ -603,8 +577,7 @@ public final class ClientGroupsDeleteSamples { public final class ClientGroupsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_Get - * .json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_Get.json */ /** * Sample code: ClientGroups_Get. @@ -627,8 +600,7 @@ public final class ClientGroupsGetSamples { */ public final class ClientGroupsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * ClientGroups_ListByNamespace.json */ /** @@ -661,8 +633,8 @@ import java.util.Map; public final class ClientsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Clients_CreateOrUpdate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_CreateOrUpdate. + * json */ /** * Sample code: Clients_CreateOrUpdate. @@ -708,8 +680,7 @@ public final class ClientsCreateOrUpdateSamples { public final class ClientsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_Delete. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_Delete.json */ /** * Sample code: Clients_Delete. @@ -732,7 +703,7 @@ public final class ClientsDeleteSamples { public final class ClientsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_Get.json */ /** * Sample code: Clients_Get. @@ -756,8 +727,8 @@ public final class ClientsGetSamples { public final class ClientsListByNamespaceSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Clients_ListByNamespace.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_ListByNamespace. + * json */ /** * Sample code: Clients_ListByNamespace. @@ -782,8 +753,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class DomainEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_CreateOrUpdate.json */ /** @@ -814,8 +784,7 @@ public final class DomainEventSubscriptionsCreateOrUpdateSamples { */ public final class DomainEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_Delete.json */ /** @@ -838,8 +807,7 @@ public final class DomainEventSubscriptionsDeleteSamples { */ public final class DomainEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_Get.json */ /** @@ -862,8 +830,7 @@ public final class DomainEventSubscriptionsGetSamples { */ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_GetDeliveryAttributes.json */ /** @@ -888,8 +855,7 @@ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { */ public final class DomainEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_GetFullUrl.json */ /** @@ -914,8 +880,7 @@ public final class DomainEventSubscriptionsGetFullUrlSamples { */ public final class DomainEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_List.json */ /** @@ -943,8 +908,7 @@ import java.util.Arrays; */ public final class DomainEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_Update.json */ /** @@ -979,8 +943,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_CreateOrUpdate.json */ /** @@ -1011,8 +974,7 @@ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class DomainTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_Delete.json */ /** @@ -1037,8 +999,7 @@ public final class DomainTopicEventSubscriptionsDeleteSamples { */ public final class DomainTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_Get.json */ /** @@ -1062,8 +1023,7 @@ public final class DomainTopicEventSubscriptionsGetSamples { */ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_GetDeliveryAttributes.json */ /** @@ -1088,8 +1048,7 @@ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_GetFullUrl.json */ /** @@ -1114,8 +1073,7 @@ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { */ public final class DomainTopicEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_List.json */ /** @@ -1143,8 +1101,7 @@ import java.util.Arrays; */ public final class DomainTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_Update.json */ /** @@ -1176,8 +1133,7 @@ public final class DomainTopicEventSubscriptionsUpdateSamples { */ public final class DomainTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopics_CreateOrUpdate.json */ /** @@ -1201,8 +1157,7 @@ public final class DomainTopicsCreateOrUpdateSamples { public final class DomainTopicsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * DomainTopics_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_Delete.json */ /** * Sample code: DomainTopics_Delete. @@ -1225,8 +1180,7 @@ public final class DomainTopicsDeleteSamples { public final class DomainTopicsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_Get - * .json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_Get.json */ /** * Sample code: DomainTopics_Get. @@ -1249,8 +1203,8 @@ public final class DomainTopicsGetSamples { public final class DomainTopicsListByDomainSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * DomainTopics_ListByDomain.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_ListByDomain + * .json */ /** * Sample code: DomainTopics_ListByDomain. @@ -1280,8 +1234,8 @@ import java.util.Map; public final class DomainsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Domains_CreateOrUpdate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_CreateOrUpdate. + * json */ /** * Sample code: Domains_CreateOrUpdate. @@ -1324,8 +1278,7 @@ public final class DomainsCreateOrUpdateSamples { public final class DomainsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Delete. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Delete.json */ /** * Sample code: Domains_Delete. @@ -1347,7 +1300,7 @@ public final class DomainsDeleteSamples { public final class DomainsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Get.json */ /** * Sample code: Domains_Get. @@ -1369,8 +1322,7 @@ public final class DomainsGetByResourceGroupSamples { */ public final class DomainsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Domains_ListBySubscription.json */ /** @@ -1392,8 +1344,7 @@ public final class DomainsListSamples { */ public final class DomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Domains_ListByResourceGroup.json */ /** @@ -1415,8 +1366,7 @@ public final class DomainsListByResourceGroupSamples { */ public final class DomainsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Domains_ListSharedAccessKeys.json */ /** @@ -1442,8 +1392,8 @@ import com.azure.resourcemanager.eventgrid.models.DomainRegenerateKeyRequest; public final class DomainsRegenerateKeySamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Domains_RegenerateKey.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_RegenerateKey. + * json */ /** * Sample code: Domains_RegenerateKey. @@ -1475,8 +1425,7 @@ import java.util.Map; public final class DomainsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Update. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Update.json */ /** * Sample code: Domains_Update. @@ -1529,8 +1478,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class EventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json */ /** @@ -1542,10 +1490,10 @@ public final class EventSubscriptionsCreateOrUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", - new EventSubscriptionInner().withDestination(new EventHubEventSubscriptionDestination().withResourceId( - "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1")) + new EventSubscriptionInner().withDestination(new WebhookEventSubscriptionDestination().withEndpointUrl( + "https://azurefunctionexample.azurewebsites.net/runtime/webhooks/EventGrid?functionName=EventGridTrigger1&code=PASSWORDCODE")) .withFilter(new EventSubscriptionFilter().withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), @@ -1553,8 +1501,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForSubscription.json */ /** @@ -1565,7 +1512,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { public static void eventSubscriptionsCreateOrUpdateForSubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .createOrUpdate("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", + .createOrUpdate("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", new EventSubscriptionInner() .withDestination( new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) @@ -1574,8 +1521,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json */ /** @@ -1587,7 +1533,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination(new ServiceBusTopicEventSubscriptionDestination().withResourceId( @@ -1602,8 +1548,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForResource.json */ /** @@ -1615,7 +1560,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { eventSubscriptionsCreateOrUpdateForResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription10", new EventSubscriptionInner() .withDestination( @@ -1627,8 +1572,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic.json */ /** @@ -1640,7 +1584,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { eventSubscriptionsCreateOrUpdateForCustomTopic(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner().withDestination(new EventHubEventSubscriptionDestination().withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1")) @@ -1651,8 +1595,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForResourceGroup.json */ /** @@ -1663,7 +1606,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { public static void eventSubscriptionsCreateOrUpdateForResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .createOrUpdate("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", + .createOrUpdate("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", "examplesubscription2", new EventSubscriptionInner() .withDestination( @@ -1675,8 +1618,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json */ /** @@ -1688,7 +1630,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner().withDestination(new EventHubEventSubscriptionDestination().withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1")) @@ -1702,8 +1644,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json */ /** @@ -1715,13 +1656,12 @@ public final class EventSubscriptionsCreateOrUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination(new StorageQueueEventSubscriptionDestination().withResourceId( "/subscriptions/d33c5f7a-02ea-40f4-bf52-07f17e84d6a8/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") - .withQueueName("queue1") - .withQueueMessageTimeToLiveInSeconds(300L)) + .withQueueName("queue1")) .withFilter(new EventSubscriptionFilter().withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)) @@ -1732,8 +1672,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json */ /** @@ -1745,7 +1684,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination(new AzureFunctionEventSubscriptionDestination().withResourceId( @@ -1760,8 +1699,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json */ /** @@ -1773,7 +1711,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination(new HybridConnectionEventSubscriptionDestination().withResourceId( @@ -1788,8 +1726,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json */ /** @@ -1801,7 +1738,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination(new ServiceBusQueueEventSubscriptionDestination().withResourceId( @@ -1825,8 +1762,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { */ public final class EventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_DeleteForCustomTopic.json */ /** @@ -1838,13 +1774,12 @@ public final class EventSubscriptionsDeleteSamples { eventSubscriptionsDeleteForCustomTopic(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .delete( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_DeleteForResourceGroup.json */ /** @@ -1855,13 +1790,12 @@ public final class EventSubscriptionsDeleteSamples { public static void eventSubscriptionsDeleteForResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .delete("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", + .delete("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", "examplesubscription2", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_DeleteForSubscription.json */ /** @@ -1872,13 +1806,12 @@ public final class EventSubscriptionsDeleteSamples { public static void eventSubscriptionsDeleteForSubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .delete("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", + .delete("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_DeleteForResource.json */ /** @@ -1890,7 +1823,7 @@ public final class EventSubscriptionsDeleteSamples { eventSubscriptionsDeleteForResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .delete( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription10", com.azure.core.util.Context.NONE); } } @@ -1904,8 +1837,7 @@ public final class EventSubscriptionsDeleteSamples { */ public final class EventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json */ /** @@ -1917,13 +1849,12 @@ public final class EventSubscriptionsGetSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json */ /** @@ -1935,13 +1866,12 @@ public final class EventSubscriptionsGetSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForResourceGroup.json */ /** @@ -1952,13 +1882,12 @@ public final class EventSubscriptionsGetSamples { public static void eventSubscriptionsGetForResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .getWithResponse("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", + .getWithResponse("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", "examplesubscription2", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_EventHubDestination.json */ /** @@ -1970,13 +1899,12 @@ public final class EventSubscriptionsGetSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForSubscription.json */ /** @@ -1987,13 +1915,12 @@ public final class EventSubscriptionsGetSamples { public static void eventSubscriptionsGetForSubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .getWithResponse("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", + .getWithResponse("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_WebhookDestination.json */ /** @@ -2005,13 +1932,12 @@ public final class EventSubscriptionsGetSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json */ /** @@ -2023,13 +1949,12 @@ public final class EventSubscriptionsGetSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic.json */ /** @@ -2041,13 +1966,12 @@ public final class EventSubscriptionsGetSamples { eventSubscriptionsGetForCustomTopic(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json */ /** @@ -2059,13 +1983,12 @@ public final class EventSubscriptionsGetSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForResource.json */ /** @@ -2076,13 +1999,12 @@ public final class EventSubscriptionsGetSamples { public static void eventSubscriptionsGetForResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json */ /** @@ -2094,7 +2016,7 @@ public final class EventSubscriptionsGetSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } } @@ -2108,8 +2030,7 @@ public final class EventSubscriptionsGetSamples { */ public final class EventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetDeliveryAttributes.json */ /** @@ -2120,9 +2041,8 @@ public final class EventSubscriptionsGetDeliveryAttributesSamples { public static void eventSubscriptionsGetDeliveryAttributes(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .getDeliveryAttributesWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", - "examplesubscription1", com.azure.core.util.Context.NONE); + .getDeliveryAttributesWithResponse("aaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaa", + com.azure.core.util.Context.NONE); } } ``` @@ -2135,8 +2055,7 @@ public final class EventSubscriptionsGetDeliveryAttributesSamples { */ public final class EventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetFullUrlForResource.json */ /** @@ -2148,13 +2067,12 @@ public final class EventSubscriptionsGetFullUrlSamples { eventSubscriptionsGetFullUrlForResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetFullUrlForResourceGroup.json */ /** @@ -2165,13 +2083,12 @@ public final class EventSubscriptionsGetFullUrlSamples { public static void eventSubscriptionsGetFullUrlForResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .getFullUrlWithResponse("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", + .getFullUrlWithResponse("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", "examplesubscription2", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetFullUrlForSubscription.json */ /** @@ -2182,13 +2099,12 @@ public final class EventSubscriptionsGetFullUrlSamples { public static void eventSubscriptionsGetFullUrlForSubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .getFullUrlWithResponse("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", + .getFullUrlWithResponse("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetFullUrlForCustomTopic.json */ /** @@ -2200,7 +2116,7 @@ public final class EventSubscriptionsGetFullUrlSamples { eventSubscriptionsGetFullUrlForCustomTopic(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } } @@ -2214,8 +2130,7 @@ public final class EventSubscriptionsGetFullUrlSamples { */ public final class EventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListGlobalBySubscription.json */ /** @@ -2238,8 +2153,7 @@ public final class EventSubscriptionsListSamples { */ public final class EventSubscriptionsListByDomainTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListByDomainTopic.json */ /** @@ -2263,8 +2177,7 @@ public final class EventSubscriptionsListByDomainTopicSamples { */ public final class EventSubscriptionsListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListByResource.json */ /** @@ -2288,8 +2201,7 @@ public final class EventSubscriptionsListByResourceSamples { */ public final class EventSubscriptionsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListGlobalByResourceGroup.json */ /** @@ -2312,8 +2224,7 @@ public final class EventSubscriptionsListByResourceGroupSamples { */ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListGlobalByResourceGroupForTopicType.json */ /** @@ -2338,8 +2249,7 @@ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSample */ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListGlobalBySubscriptionForTopicType.json */ /** @@ -2364,8 +2274,7 @@ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples */ public final class EventSubscriptionsListRegionalByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListRegionalByResourceGroup.json */ /** @@ -2389,8 +2298,7 @@ public final class EventSubscriptionsListRegionalByResourceGroupSamples { */ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListRegionalByResourceGroupForTopicType.json */ /** @@ -2415,8 +2323,7 @@ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamp */ public final class EventSubscriptionsListRegionalBySubscriptionSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListRegionalBySubscription.json */ /** @@ -2440,8 +2347,7 @@ public final class EventSubscriptionsListRegionalBySubscriptionSamples { */ public final class EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListRegionalBySubscriptionForTopicType.json */ /** @@ -2478,8 +2384,7 @@ import java.util.Arrays; */ public final class EventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json */ /** @@ -2491,7 +2396,7 @@ public final class EventSubscriptionsUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new EventHubEventSubscriptionDestination().withResourceId( @@ -2504,8 +2409,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json */ /** @@ -2517,7 +2421,7 @@ public final class EventSubscriptionsUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new AzureFunctionEventSubscriptionDestination().withResourceId( @@ -2532,8 +2436,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json */ /** @@ -2545,7 +2448,7 @@ public final class EventSubscriptionsUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2558,8 +2461,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json */ /** @@ -2571,7 +2473,7 @@ public final class EventSubscriptionsUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new StorageQueueEventSubscriptionDestination().withResourceId( @@ -2588,8 +2490,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json */ /** @@ -2601,7 +2502,7 @@ public final class EventSubscriptionsUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new ServiceBusTopicEventSubscriptionDestination().withResourceId( @@ -2614,8 +2515,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json */ /** @@ -2627,7 +2527,7 @@ public final class EventSubscriptionsUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new HybridConnectionEventSubscriptionDestination().withResourceId( @@ -2640,8 +2540,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json */ /** @@ -2653,7 +2552,7 @@ public final class EventSubscriptionsUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new ServiceBusQueueEventSubscriptionDestination().withResourceId( @@ -2668,8 +2567,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic.json */ /** @@ -2681,7 +2579,7 @@ public final class EventSubscriptionsUpdateSamples { eventSubscriptionsUpdateForCustomTopic(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2694,8 +2592,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForResource.json */ /** @@ -2707,7 +2604,7 @@ public final class EventSubscriptionsUpdateSamples { eventSubscriptionsUpdateForResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2720,8 +2617,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForResourceGroup.json */ /** @@ -2732,7 +2628,7 @@ public final class EventSubscriptionsUpdateSamples { public static void eventSubscriptionsUpdateForResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .update("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", + .update("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", "examplesubscription2", new EventSubscriptionUpdateParameters() .withDestination(new EventHubEventSubscriptionDestination().withResourceId( @@ -2745,8 +2641,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForSubscription.json */ /** @@ -2757,7 +2652,7 @@ public final class EventSubscriptionsUpdateSamples { public static void eventSubscriptionsUpdateForSubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .update("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", + .update("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", new EventSubscriptionUpdateParameters() .withDestination( new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) @@ -2779,8 +2674,7 @@ public final class EventSubscriptionsUpdateSamples { public final class ExtensionTopicsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * ExtensionTopics_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ExtensionTopics_Get.json */ /** * Sample code: ExtensionTopics_Get. @@ -2790,7 +2684,7 @@ public final class ExtensionTopicsGetSamples { public static void extensionTopicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.extensionTopics() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default", com.azure.core.util.Context.NONE); } } @@ -2810,8 +2704,7 @@ import java.time.Duration; */ public final class NamespaceTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_CreateOrUpdate.json */ /** @@ -2842,8 +2735,7 @@ public final class NamespaceTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class NamespaceTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_Delete.json */ /** @@ -2868,8 +2760,7 @@ public final class NamespaceTopicEventSubscriptionsDeleteSamples { */ public final class NamespaceTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_Get.json */ /** @@ -2894,8 +2785,7 @@ public final class NamespaceTopicEventSubscriptionsGetSamples { */ public final class NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json */ /** @@ -2920,8 +2810,7 @@ public final class NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples */ public final class NamespaceTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_GetFullUrl.json */ /** @@ -2946,8 +2835,7 @@ public final class NamespaceTopicEventSubscriptionsGetFullUrlSamples { */ public final class NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json */ /** @@ -2979,8 +2867,7 @@ import java.time.Duration; */ public final class NamespaceTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_Update.json */ /** @@ -3016,8 +2903,7 @@ import com.azure.resourcemanager.eventgrid.models.PublisherType; */ public final class NamespaceTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopics_CreateOrUpdate.json */ /** @@ -3046,8 +2932,8 @@ public final class NamespaceTopicsCreateOrUpdateSamples { public final class NamespaceTopicsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NamespaceTopics_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Delete. + * json */ /** * Sample code: NamespaceTopics_Delete. @@ -3070,8 +2956,7 @@ public final class NamespaceTopicsDeleteSamples { public final class NamespaceTopicsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NamespaceTopics_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Get.json */ /** * Sample code: NamespaceTopics_Get. @@ -3094,8 +2979,7 @@ public final class NamespaceTopicsGetSamples { */ public final class NamespaceTopicsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopics_ListByNamespace.json */ /** @@ -3118,8 +3002,7 @@ public final class NamespaceTopicsListByNamespaceSamples { */ public final class NamespaceTopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopics_ListSharedAccessKeys.json */ /** @@ -3146,8 +3029,7 @@ import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; */ public final class NamespaceTopicsRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopics_RegenerateKey.json */ /** @@ -3174,8 +3056,8 @@ import com.azure.resourcemanager.eventgrid.models.NamespaceTopic; public final class NamespaceTopicsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NamespaceTopics_Update.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Update. + * json */ /** * Sample code: NamespaceTopics_Update. @@ -3206,8 +3088,8 @@ import java.util.Map; public final class NamespacesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Namespaces_CreateOrUpdate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_CreateOrUpdate + * .json */ /** * Sample code: Namespaces_CreateOrUpdate. @@ -3250,8 +3132,7 @@ public final class NamespacesCreateOrUpdateSamples { public final class NamespacesDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Namespaces_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Delete.json */ /** * Sample code: Namespaces_Delete. @@ -3273,8 +3154,7 @@ public final class NamespacesDeleteSamples { public final class NamespacesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_Get. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Get.json */ /** * Sample code: Namespaces_Get. @@ -3296,8 +3176,7 @@ public final class NamespacesGetByResourceGroupSamples { */ public final class NamespacesListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Namespaces_ListBySubscription.json */ /** @@ -3319,8 +3198,7 @@ public final class NamespacesListSamples { */ public final class NamespacesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Namespaces_ListByResourceGroup.json */ /** @@ -3342,8 +3220,7 @@ public final class NamespacesListByResourceGroupSamples { */ public final class NamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Namespaces_ListSharedAccessKeys.json */ /** @@ -3369,8 +3246,8 @@ import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; public final class NamespacesRegenerateKeySamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Namespaces_RegenerateKey.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_RegenerateKey. + * json */ /** * Sample code: Namespaces_RegenerateKey. @@ -3399,8 +3276,7 @@ import java.util.Map; public final class NamespacesUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Namespaces_Update.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Update.json */ /** * Sample code: Namespaces_Update. @@ -3436,8 +3312,7 @@ public final class NamespacesUpdateSamples { */ public final class NamespacesValidateCustomDomainOwnershipSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Namespaces_ValidateCustomDomainOwnership.json */ /** @@ -3453,90 +3328,6 @@ public final class NamespacesValidateCustomDomainOwnershipSamples { } ``` -### NetworkSecurityPerimeterConfigurations_Get - -```java -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; - -/** - * Samples for NetworkSecurityPerimeterConfigurations Get. - */ -public final class NetworkSecurityPerimeterConfigurationsGetSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_Get.json - */ - /** - * Sample code: NetworkSecurityPerimeterConfigurations_Get. - * - * @param manager Entry point to EventGridManager. - */ - public static void - networkSecurityPerimeterConfigurationsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.networkSecurityPerimeterConfigurations() - .getWithResponse("examplerg", NetworkSecurityPerimeterResourceType.TOPICS, "exampleResourceName", - "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter", "someAssociation", com.azure.core.util.Context.NONE); - } -} -``` - -### NetworkSecurityPerimeterConfigurations_List - -```java -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; - -/** - * Samples for NetworkSecurityPerimeterConfigurations List. - */ -public final class NetworkSecurityPerimeterConfigurationsListSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_List.json - */ - /** - * Sample code: NetworkSecurityPerimeterConfigurations_List. - * - * @param manager Entry point to EventGridManager. - */ - public static void - networkSecurityPerimeterConfigurationsList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.networkSecurityPerimeterConfigurations() - .list("examplerg", NetworkSecurityPerimeterResourceType.TOPICS, "exampleResourceName", - com.azure.core.util.Context.NONE); - } -} -``` - -### NetworkSecurityPerimeterConfigurations_Reconcile - -```java -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; - -/** - * Samples for NetworkSecurityPerimeterConfigurations Reconcile. - */ -public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_Reconcile.json - */ - /** - * Sample code: NetworkSecurityPerimeterConfigurations_Reconcile. - * - * @param manager Entry point to EventGridManager. - */ - public static void - networkSecurityPerimeterConfigurationsReconcile(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.networkSecurityPerimeterConfigurations() - .reconcile("examplerg", NetworkSecurityPerimeterResourceType.TOPICS, "exampleResourceName", - "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter", "someAssociation", com.azure.core.util.Context.NONE); - } -} -``` - ### Operations_List ```java @@ -3546,8 +3337,7 @@ public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { public final class OperationsListSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Operations_List. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Operations_List.json */ /** * Sample code: Operations_List. @@ -3572,8 +3362,7 @@ import java.util.UUID; */ public final class PartnerConfigurationsAuthorizePartnerSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_AuthorizePartner.json */ /** @@ -3609,8 +3398,7 @@ import java.util.UUID; */ public final class PartnerConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_CreateOrUpdate.json */ /** @@ -3649,8 +3437,7 @@ public final class PartnerConfigurationsCreateOrUpdateSamples { */ public final class PartnerConfigurationsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_Delete.json */ /** @@ -3673,8 +3460,8 @@ public final class PartnerConfigurationsDeleteSamples { public final class PartnerConfigurationsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerConfigurations_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerConfigurations_Get + * .json */ /** * Sample code: PartnerConfigurations_Get. @@ -3695,8 +3482,7 @@ public final class PartnerConfigurationsGetByResourceGroupSamples { */ public final class PartnerConfigurationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_ListBySubscription.json */ /** @@ -3719,8 +3505,7 @@ public final class PartnerConfigurationsListSamples { */ public final class PartnerConfigurationsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_ListByResourceGroup.json */ /** @@ -3747,8 +3532,7 @@ import java.util.UUID; */ public final class PartnerConfigurationsUnauthorizePartnerSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_UnauthorizePartner.json */ /** @@ -3781,8 +3565,7 @@ import java.util.Map; */ public final class PartnerConfigurationsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_Update.json */ /** @@ -3812,205 +3595,6 @@ public final class PartnerConfigurationsUpdateSamples { } ``` -### PartnerDestinations_Activate - -```java -/** - * Samples for PartnerDestinations Activate. - */ -public final class PartnerDestinationsActivateSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_Activate.json - */ - /** - * Sample code: PartnerDestinations_Activate. - * - * @param manager Entry point to EventGridManager. - */ - public static void partnerDestinationsActivate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations() - .activateWithResponse("examplerg", "examplePartnerDestination1", com.azure.core.util.Context.NONE); - } -} -``` - -### PartnerDestinations_CreateOrUpdate - -```java -import java.time.OffsetDateTime; -import java.util.UUID; - -/** - * Samples for PartnerDestinations CreateOrUpdate. - */ -public final class PartnerDestinationsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_CreateOrUpdate.json - */ - /** - * Sample code: PartnerDestinations_CreateOrUpdate. - * - * @param manager Entry point to EventGridManager. - */ - public static void partnerDestinationsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations() - .define("examplePartnerDestinationName1") - .withRegion("westus2") - .withExistingResourceGroup("examplerg") - .withPartnerRegistrationImmutableId(UUID.fromString("0bd70ee2-7d95-447e-ab1f-c4f320019404")) - .withEndpointServiceContext("This is an example") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2022-03-14T19:33:43.430Z")) - .withEndpointBaseUrl("https://www.example/endpoint") - .withMessageForActivation("Sample Activation message") - .create(); - } -} -``` - -### PartnerDestinations_Delete - -```java -/** - * Samples for PartnerDestinations Delete. - */ -public final class PartnerDestinationsDeleteSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_Delete.json - */ - /** - * Sample code: PartnerDestinations_Delete. - * - * @param manager Entry point to EventGridManager. - */ - public static void partnerDestinationsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations() - .delete("examplerg", "examplePartnerDestinationName1", com.azure.core.util.Context.NONE); - } -} -``` - -### PartnerDestinations_GetByResourceGroup - -```java -/** - * Samples for PartnerDestinations GetByResourceGroup. - */ -public final class PartnerDestinationsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_Get.json - */ - /** - * Sample code: PartnerDestinations_Get. - * - * @param manager Entry point to EventGridManager. - */ - public static void partnerDestinationsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations() - .getByResourceGroupWithResponse("examplerg", "examplePartnerDestinationName1", - com.azure.core.util.Context.NONE); - } -} -``` - -### PartnerDestinations_List - -```java -/** - * Samples for PartnerDestinations List. - */ -public final class PartnerDestinationsListSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_ListBySubscription.json - */ - /** - * Sample code: PartnerDestinations_ListBySubscription. - * - * @param manager Entry point to EventGridManager. - */ - public static void - partnerDestinationsListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations().list(null, null, com.azure.core.util.Context.NONE); - } -} -``` - -### PartnerDestinations_ListByResourceGroup - -```java -/** - * Samples for PartnerDestinations ListByResourceGroup. - */ -public final class PartnerDestinationsListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_ListByResourceGroup.json - */ - /** - * Sample code: PartnerDestinations_ListByResourceGroup. - * - * @param manager Entry point to EventGridManager. - */ - public static void - partnerDestinationsListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); - } -} -``` - -### PartnerDestinations_Update - -```java -import com.azure.resourcemanager.eventgrid.models.PartnerDestination; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for PartnerDestinations Update. - */ -public final class PartnerDestinationsUpdateSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_Update.json - */ - /** - * Sample code: PartnerDestinations_Update. - * - * @param manager Entry point to EventGridManager. - */ - public static void partnerDestinationsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - PartnerDestination resource = manager.partnerDestinations() - .getByResourceGroupWithResponse("examplerg", "examplePartnerDestinationName1", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - ### PartnerNamespaces_CreateOrUpdate ```java @@ -4022,8 +3606,7 @@ import java.util.Map; */ public final class PartnerNamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerNamespaces_CreateOrUpdate.json */ /** @@ -4038,7 +3621,7 @@ public final class PartnerNamespacesCreateOrUpdateSamples { .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withPartnerRegistrationFullyQualifiedId( - "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1") + "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1") .create(); } @@ -4065,8 +3648,8 @@ public final class PartnerNamespacesCreateOrUpdateSamples { public final class PartnerNamespacesDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerNamespaces_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Delete. + * json */ /** * Sample code: PartnerNamespaces_Delete. @@ -4089,8 +3672,8 @@ public final class PartnerNamespacesDeleteSamples { public final class PartnerNamespacesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerNamespaces_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Get. + * json */ /** * Sample code: PartnerNamespaces_Get. @@ -4113,8 +3696,7 @@ public final class PartnerNamespacesGetByResourceGroupSamples { */ public final class PartnerNamespacesListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerNamespaces_ListBySubscription.json */ /** @@ -4137,8 +3719,7 @@ public final class PartnerNamespacesListSamples { */ public final class PartnerNamespacesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerNamespaces_ListByResourceGroup.json */ /** @@ -4161,8 +3742,7 @@ public final class PartnerNamespacesListByResourceGroupSamples { */ public final class PartnerNamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerNamespaces_ListSharedAccessKeys.json */ /** @@ -4189,8 +3769,7 @@ import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceRegenerateKeyR */ public final class PartnerNamespacesRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerNamespaces_RegenerateKey.json */ /** @@ -4220,8 +3799,8 @@ import java.util.Map; public final class PartnerNamespacesUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerNamespaces_Update.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Update. + * json */ /** * Sample code: PartnerNamespaces_Update. @@ -4261,8 +3840,7 @@ import java.util.Map; */ public final class PartnerRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerRegistrations_CreateOrUpdate.json */ /** @@ -4303,8 +3881,7 @@ public final class PartnerRegistrationsCreateOrUpdateSamples { */ public final class PartnerRegistrationsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerRegistrations_Delete.json */ /** @@ -4328,8 +3905,8 @@ public final class PartnerRegistrationsDeleteSamples { public final class PartnerRegistrationsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerRegistrations_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerRegistrations_Get. + * json */ /** * Sample code: PartnerRegistrations_Get. @@ -4352,8 +3929,7 @@ public final class PartnerRegistrationsGetByResourceGroupSamples { */ public final class PartnerRegistrationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerRegistrations_ListBySubscription.json */ /** @@ -4376,8 +3952,7 @@ public final class PartnerRegistrationsListSamples { */ public final class PartnerRegistrationsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerRegistrations_ListByResourceGroup.json */ /** @@ -4404,8 +3979,7 @@ import java.util.Map; */ public final class PartnerRegistrationsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerRegistrations_Update.json */ /** @@ -4418,7 +3992,7 @@ public final class PartnerRegistrationsUpdateSamples { .getByResourceGroupWithResponse("examplerg", "examplePartnerRegistrationName1", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("NewKey", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } // Use "Map.of" if available @@ -4447,8 +4021,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_CreateOrUpdate.json */ /** @@ -4479,8 +4052,7 @@ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class PartnerTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_Delete.json */ /** @@ -4504,8 +4076,7 @@ public final class PartnerTopicEventSubscriptionsDeleteSamples { */ public final class PartnerTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_Get.json */ /** @@ -4529,8 +4100,7 @@ public final class PartnerTopicEventSubscriptionsGetSamples { */ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_GetDeliveryAttributes.json */ /** @@ -4555,8 +4125,7 @@ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_GetFullUrl.json */ /** @@ -4581,8 +4150,7 @@ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { */ public final class PartnerTopicEventSubscriptionsListByPartnerTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_ListByPartnerTopic.json */ /** @@ -4611,8 +4179,7 @@ import java.util.Arrays; */ public final class PartnerTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_Update.json */ /** @@ -4645,8 +4212,8 @@ public final class PartnerTopicEventSubscriptionsUpdateSamples { public final class PartnerTopicsActivateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerTopics_Activate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Activate. + * json */ /** * Sample code: PartnerTopics_Activate. @@ -4671,8 +4238,7 @@ import java.util.UUID; */ public final class PartnerTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopics_CreateOrUpdate.json */ /** @@ -4704,8 +4270,8 @@ public final class PartnerTopicsCreateOrUpdateSamples { public final class PartnerTopicsDeactivateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerTopics_Deactivate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Deactivate. + * json */ /** * Sample code: PartnerTopics_Deactivate. @@ -4728,8 +4294,7 @@ public final class PartnerTopicsDeactivateSamples { public final class PartnerTopicsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerTopics_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Delete.json */ /** * Sample code: PartnerTopics_Delete. @@ -4751,8 +4316,7 @@ public final class PartnerTopicsDeleteSamples { public final class PartnerTopicsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerTopics_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Get.json */ /** * Sample code: PartnerTopics_Get. @@ -4774,8 +4338,7 @@ public final class PartnerTopicsGetByResourceGroupSamples { */ public final class PartnerTopicsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopics_ListBySubscription.json */ /** @@ -4797,8 +4360,7 @@ public final class PartnerTopicsListSamples { */ public final class PartnerTopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopics_ListByResourceGroup.json */ /** @@ -4825,8 +4387,7 @@ import java.util.Map; public final class PartnerTopicsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerTopics_Update.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Update.json */ /** * Sample code: PartnerTopics_Update. @@ -4864,8 +4425,7 @@ import com.azure.resourcemanager.eventgrid.models.PermissionType; */ public final class PermissionBindingsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PermissionBindings_CreateOrUpdate.json */ /** @@ -4894,8 +4454,8 @@ public final class PermissionBindingsCreateOrUpdateSamples { public final class PermissionBindingsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PermissionBindings_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_Delete + * .json */ /** * Sample code: PermissionBindings_Delete. @@ -4919,8 +4479,8 @@ public final class PermissionBindingsDeleteSamples { public final class PermissionBindingsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PermissionBindings_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_Get. + * json */ /** * Sample code: PermissionBindings_Get. @@ -4943,8 +4503,7 @@ public final class PermissionBindingsGetSamples { */ public final class PermissionBindingsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PermissionBindings_ListByNamespace.json */ /** @@ -4969,8 +4528,7 @@ import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsPare */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PrivateEndpointConnections_Delete.json */ /** @@ -4996,8 +4554,7 @@ import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsPare */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PrivateEndpointConnections_Get.json */ /** @@ -5023,8 +4580,7 @@ import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsPare */ public final class PrivateEndpointConnectionsListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PrivateEndpointConnections_ListByResource.json */ /** @@ -5054,8 +4610,7 @@ import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsPare */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PrivateEndpointConnections_Update.json */ /** @@ -5085,8 +4640,8 @@ public final class PrivateEndpointConnectionsUpdateSamples { public final class PrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PrivateLinkResources_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get. + * json */ /** * Sample code: PrivateLinkResources_Get. @@ -5108,8 +4663,7 @@ public final class PrivateLinkResourcesGetSamples { */ public final class PrivateLinkResourcesListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PrivateLinkResources_ListByResource.json */ /** @@ -5137,8 +4691,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_CreateOrUpdate.json */ /** @@ -5169,8 +4722,7 @@ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class SystemTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_Delete.json */ /** @@ -5194,8 +4746,7 @@ public final class SystemTopicEventSubscriptionsDeleteSamples { */ public final class SystemTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_Get.json */ /** @@ -5219,8 +4770,7 @@ public final class SystemTopicEventSubscriptionsGetSamples { */ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_GetDeliveryAttributes.json */ /** @@ -5245,8 +4795,7 @@ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_GetFullUrl.json */ /** @@ -5271,8 +4820,7 @@ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { */ public final class SystemTopicEventSubscriptionsListBySystemTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_ListBySystemTopic.json */ /** @@ -5301,8 +4849,7 @@ import java.util.Arrays; */ public final class SystemTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_Update.json */ /** @@ -5337,8 +4884,7 @@ import java.util.Map; */ public final class SystemTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopics_CreateOrUpdate.json */ /** @@ -5353,7 +4899,7 @@ public final class SystemTopicsCreateOrUpdateSamples { .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withSource( - "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e") + "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e") .withTopicType("microsoft.storage.storageaccounts") .create(); } @@ -5381,8 +4927,7 @@ public final class SystemTopicsCreateOrUpdateSamples { public final class SystemTopicsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * SystemTopics_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Delete.json */ /** * Sample code: SystemTopics_Delete. @@ -5404,8 +4949,7 @@ public final class SystemTopicsDeleteSamples { public final class SystemTopicsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_Get - * .json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Get.json */ /** * Sample code: SystemTopics_Get. @@ -5427,8 +4971,7 @@ public final class SystemTopicsGetByResourceGroupSamples { */ public final class SystemTopicsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopics_ListBySubscription.json */ /** @@ -5450,8 +4993,7 @@ public final class SystemTopicsListSamples { */ public final class SystemTopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopics_ListByResourceGroup.json */ /** @@ -5478,8 +5020,7 @@ import java.util.Map; public final class SystemTopicsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * SystemTopics_Update.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Update.json */ /** * Sample code: SystemTopics_Update. @@ -5518,8 +5059,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class TopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_CreateOrUpdate.json */ /** @@ -5549,8 +5089,7 @@ public final class TopicEventSubscriptionsCreateOrUpdateSamples { */ public final class TopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_Delete.json */ /** @@ -5560,7 +5099,7 @@ public final class TopicEventSubscriptionsDeleteSamples { */ public static void topicEventSubscriptionsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.topicEventSubscriptions() - .delete("examplerg", "exampleTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); + .delete("examplerg", "exampleTopic", "examplesubscription", com.azure.core.util.Context.NONE); } } ``` @@ -5573,8 +5112,7 @@ public final class TopicEventSubscriptionsDeleteSamples { */ public final class TopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_Get.json */ /** @@ -5597,8 +5135,7 @@ public final class TopicEventSubscriptionsGetSamples { */ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_GetDeliveryAttributes.json */ /** @@ -5623,8 +5160,7 @@ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class TopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_GetFullUrl.json */ /** @@ -5648,8 +5184,7 @@ public final class TopicEventSubscriptionsGetFullUrlSamples { */ public final class TopicEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_List.json */ /** @@ -5677,8 +5212,7 @@ import java.util.Arrays; */ public final class TopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_Update.json */ /** @@ -5712,8 +5246,7 @@ import java.util.Arrays; */ public final class TopicSpacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicSpaces_CreateOrUpdate.json */ /** @@ -5740,8 +5273,7 @@ public final class TopicSpacesCreateOrUpdateSamples { public final class TopicSpacesDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * TopicSpaces_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_Delete.json */ /** * Sample code: TopicSpaces_Delete. @@ -5764,8 +5296,7 @@ public final class TopicSpacesDeleteSamples { public final class TopicSpacesGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_Get. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_Get.json */ /** * Sample code: TopicSpaces_Get. @@ -5788,8 +5319,7 @@ public final class TopicSpacesGetSamples { */ public final class TopicSpacesListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicSpaces_ListByNamespace.json */ /** @@ -5813,8 +5343,7 @@ public final class TopicSpacesListByNamespaceSamples { public final class TopicTypesGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_Get. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_Get.json */ /** * Sample code: TopicTypes_Get. @@ -5836,8 +5365,7 @@ public final class TopicTypesGetSamples { public final class TopicTypesListSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_List. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_List.json */ /** * Sample code: TopicTypes_List. @@ -5859,8 +5387,8 @@ public final class TopicTypesListSamples { public final class TopicTypesListEventTypesSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * TopicTypes_ListEventTypes.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_ListEventTypes + * .json */ /** * Sample code: TopicTypes_ListEventTypes. @@ -5876,12 +5404,9 @@ public final class TopicTypesListEventTypesSamples { ### Topics_CreateOrUpdate ```java -import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.IpActionType; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceKind; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -5892,8 +5417,8 @@ import java.util.Map; public final class TopicsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Topics_CreateOrUpdate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_CreateOrUpdate. + * json */ /** * Sample code: Topics_CreateOrUpdate. @@ -5913,30 +5438,6 @@ public final class TopicsCreateOrUpdateSamples { .create(); } - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Topics_CreateOrUpdateForAzureArc.json - */ - /** - * Sample code: Topics_CreateOrUpdateForAzureArc. - * - * @param manager Entry point to EventGridManager. - */ - public static void topicsCreateOrUpdateForAzureArc(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics() - .define("exampletopic1") - .withRegion("westus2") - .withExistingResourceGroup("examplerg") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withKind(ResourceKind.AZURE_ARC) - .withExtendedLocation(new ExtendedLocation().withName( - "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourcegroups/examplerg/providers/Microsoft.ExtendedLocation/CustomLocations/exampleCustomLocation") - .withType("CustomLocation")) - .withInputSchema(InputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .create(); - } - // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { @@ -5960,8 +5461,7 @@ public final class TopicsCreateOrUpdateSamples { public final class TopicsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Delete. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Delete.json */ /** * Sample code: Topics_Delete. @@ -5969,7 +5469,7 @@ public final class TopicsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void topicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().delete("examplerg1", "exampletopic1", com.azure.core.util.Context.NONE); + manager.topics().delete("examplerg", "exampletopic", com.azure.core.util.Context.NONE); } } ``` @@ -5983,7 +5483,7 @@ public final class TopicsDeleteSamples { public final class TopicsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Get.json */ /** * Sample code: Topics_Get. @@ -6005,8 +5505,8 @@ public final class TopicsGetByResourceGroupSamples { public final class TopicsListSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Topics_ListBySubscription.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_ListBySubscription + * .json */ /** * Sample code: Topics_ListBySubscription. @@ -6027,8 +5527,7 @@ public final class TopicsListSamples { */ public final class TopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Topics_ListByResourceGroup.json */ /** @@ -6051,8 +5550,8 @@ public final class TopicsListByResourceGroupSamples { public final class TopicsListEventTypesSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Topics_ListEventTypes.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_ListEventTypes. + * json */ /** * Sample code: Topics_ListEventTypes. @@ -6075,8 +5574,7 @@ public final class TopicsListEventTypesSamples { */ public final class TopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Topics_ListSharedAccessKeys.json */ /** @@ -6102,8 +5600,7 @@ import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; public final class TopicsRegenerateKeySamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Topics_RegenerateKey.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_RegenerateKey.json */ /** * Sample code: Topics_RegenerateKey. @@ -6135,8 +5632,7 @@ import java.util.Map; public final class TopicsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Update. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Update.json */ /** * Sample code: Topics_Update. @@ -6179,8 +5675,7 @@ public final class TopicsUpdateSamples { public final class VerifiedPartnersGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * VerifiedPartners_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/VerifiedPartners_Get.json */ /** * Sample code: VerifiedPartners_Get. @@ -6202,8 +5697,8 @@ public final class VerifiedPartnersGetSamples { public final class VerifiedPartnersListSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * VerifiedPartners_List.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/VerifiedPartners_List. + * json */ /** * Sample code: VerifiedPartners_List. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml index 2689ecf4d8e9..e845435cad4f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for EventGrid Management - This package contains Microsoft Azure SDK for EventGrid Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure EventGrid Management Client. Package tag package-2024-06-preview. + This package contains Microsoft Azure SDK for EventGrid Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure EventGrid Management Client. Package tag package-2025-02. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/EventGridManager.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/EventGridManager.java index 2338b9af943a..a45a0bfc99f7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/EventGridManager.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/EventGridManager.java @@ -38,10 +38,8 @@ import com.azure.resourcemanager.eventgrid.implementation.NamespaceTopicEventSubscriptionsImpl; import com.azure.resourcemanager.eventgrid.implementation.NamespaceTopicsImpl; import com.azure.resourcemanager.eventgrid.implementation.NamespacesImpl; -import com.azure.resourcemanager.eventgrid.implementation.NetworkSecurityPerimeterConfigurationsImpl; import com.azure.resourcemanager.eventgrid.implementation.OperationsImpl; import com.azure.resourcemanager.eventgrid.implementation.PartnerConfigurationsImpl; -import com.azure.resourcemanager.eventgrid.implementation.PartnerDestinationsImpl; import com.azure.resourcemanager.eventgrid.implementation.PartnerNamespacesImpl; import com.azure.resourcemanager.eventgrid.implementation.PartnerRegistrationsImpl; import com.azure.resourcemanager.eventgrid.implementation.PartnerTopicEventSubscriptionsImpl; @@ -69,10 +67,8 @@ import com.azure.resourcemanager.eventgrid.models.NamespaceTopicEventSubscriptions; import com.azure.resourcemanager.eventgrid.models.NamespaceTopics; import com.azure.resourcemanager.eventgrid.models.Namespaces; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurations; import com.azure.resourcemanager.eventgrid.models.Operations; import com.azure.resourcemanager.eventgrid.models.PartnerConfigurations; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinations; import com.azure.resourcemanager.eventgrid.models.PartnerNamespaces; import com.azure.resourcemanager.eventgrid.models.PartnerRegistrations; import com.azure.resourcemanager.eventgrid.models.PartnerTopicEventSubscriptions; @@ -111,17 +107,17 @@ public final class EventGridManager { private DomainTopics domainTopics; - private DomainTopicEventSubscriptions domainTopicEventSubscriptions; - private TopicEventSubscriptions topicEventSubscriptions; private DomainEventSubscriptions domainEventSubscriptions; + private NamespaceTopicEventSubscriptions namespaceTopicEventSubscriptions; + private EventSubscriptions eventSubscriptions; - private SystemTopicEventSubscriptions systemTopicEventSubscriptions; + private DomainTopicEventSubscriptions domainTopicEventSubscriptions; - private NamespaceTopicEventSubscriptions namespaceTopicEventSubscriptions; + private SystemTopicEventSubscriptions systemTopicEventSubscriptions; private PartnerTopicEventSubscriptions partnerTopicEventSubscriptions; @@ -131,9 +127,9 @@ public final class EventGridManager { private Operations operations; - private PartnerConfigurations partnerConfigurations; + private Topics topics; - private PartnerDestinations partnerDestinations; + private PartnerConfigurations partnerConfigurations; private PartnerNamespaces partnerNamespaces; @@ -141,8 +137,6 @@ public final class EventGridManager { private PartnerTopics partnerTopics; - private NetworkSecurityPerimeterConfigurations networkSecurityPerimeterConfigurations; - private PermissionBindings permissionBindings; private PrivateEndpointConnections privateEndpointConnections; @@ -151,8 +145,6 @@ public final class EventGridManager { private SystemTopics systemTopics; - private Topics topics; - private ExtensionTopics extensionTopics; private TopicSpaces topicSpaces; @@ -325,7 +317,7 @@ public EventGridManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.eventgrid") .append("/") - .append("1.2.0-beta.7"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -443,19 +435,6 @@ public DomainTopics domainTopics() { return domainTopics; } - /** - * Gets the resource collection API of DomainTopicEventSubscriptions. - * - * @return Resource collection API of DomainTopicEventSubscriptions. - */ - public DomainTopicEventSubscriptions domainTopicEventSubscriptions() { - if (this.domainTopicEventSubscriptions == null) { - this.domainTopicEventSubscriptions - = new DomainTopicEventSubscriptionsImpl(clientObject.getDomainTopicEventSubscriptions(), this); - } - return domainTopicEventSubscriptions; - } - /** * Gets the resource collection API of TopicEventSubscriptions. It manages EventSubscription. * @@ -482,6 +461,19 @@ public DomainEventSubscriptions domainEventSubscriptions() { return domainEventSubscriptions; } + /** + * Gets the resource collection API of NamespaceTopicEventSubscriptions. It manages Subscription. + * + * @return Resource collection API of NamespaceTopicEventSubscriptions. + */ + public NamespaceTopicEventSubscriptions namespaceTopicEventSubscriptions() { + if (this.namespaceTopicEventSubscriptions == null) { + this.namespaceTopicEventSubscriptions + = new NamespaceTopicEventSubscriptionsImpl(clientObject.getNamespaceTopicEventSubscriptions(), this); + } + return namespaceTopicEventSubscriptions; + } + /** * Gets the resource collection API of EventSubscriptions. * @@ -494,6 +486,19 @@ public EventSubscriptions eventSubscriptions() { return eventSubscriptions; } + /** + * Gets the resource collection API of DomainTopicEventSubscriptions. + * + * @return Resource collection API of DomainTopicEventSubscriptions. + */ + public DomainTopicEventSubscriptions domainTopicEventSubscriptions() { + if (this.domainTopicEventSubscriptions == null) { + this.domainTopicEventSubscriptions + = new DomainTopicEventSubscriptionsImpl(clientObject.getDomainTopicEventSubscriptions(), this); + } + return domainTopicEventSubscriptions; + } + /** * Gets the resource collection API of SystemTopicEventSubscriptions. * @@ -507,19 +512,6 @@ public SystemTopicEventSubscriptions systemTopicEventSubscriptions() { return systemTopicEventSubscriptions; } - /** - * Gets the resource collection API of NamespaceTopicEventSubscriptions. It manages Subscription. - * - * @return Resource collection API of NamespaceTopicEventSubscriptions. - */ - public NamespaceTopicEventSubscriptions namespaceTopicEventSubscriptions() { - if (this.namespaceTopicEventSubscriptions == null) { - this.namespaceTopicEventSubscriptions - = new NamespaceTopicEventSubscriptionsImpl(clientObject.getNamespaceTopicEventSubscriptions(), this); - } - return namespaceTopicEventSubscriptions; - } - /** * Gets the resource collection API of PartnerTopicEventSubscriptions. * @@ -570,27 +562,27 @@ public Operations operations() { } /** - * Gets the resource collection API of PartnerConfigurations. + * Gets the resource collection API of Topics. It manages Topic. * - * @return Resource collection API of PartnerConfigurations. + * @return Resource collection API of Topics. */ - public PartnerConfigurations partnerConfigurations() { - if (this.partnerConfigurations == null) { - this.partnerConfigurations = new PartnerConfigurationsImpl(clientObject.getPartnerConfigurations(), this); + public Topics topics() { + if (this.topics == null) { + this.topics = new TopicsImpl(clientObject.getTopics(), this); } - return partnerConfigurations; + return topics; } /** - * Gets the resource collection API of PartnerDestinations. It manages PartnerDestination. + * Gets the resource collection API of PartnerConfigurations. * - * @return Resource collection API of PartnerDestinations. + * @return Resource collection API of PartnerConfigurations. */ - public PartnerDestinations partnerDestinations() { - if (this.partnerDestinations == null) { - this.partnerDestinations = new PartnerDestinationsImpl(clientObject.getPartnerDestinations(), this); + public PartnerConfigurations partnerConfigurations() { + if (this.partnerConfigurations == null) { + this.partnerConfigurations = new PartnerConfigurationsImpl(clientObject.getPartnerConfigurations(), this); } - return partnerDestinations; + return partnerConfigurations; } /** @@ -629,19 +621,6 @@ public PartnerTopics partnerTopics() { return partnerTopics; } - /** - * Gets the resource collection API of NetworkSecurityPerimeterConfigurations. - * - * @return Resource collection API of NetworkSecurityPerimeterConfigurations. - */ - public NetworkSecurityPerimeterConfigurations networkSecurityPerimeterConfigurations() { - if (this.networkSecurityPerimeterConfigurations == null) { - this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsImpl( - clientObject.getNetworkSecurityPerimeterConfigurations(), this); - } - return networkSecurityPerimeterConfigurations; - } - /** * Gets the resource collection API of PermissionBindings. It manages PermissionBinding. * @@ -691,18 +670,6 @@ public SystemTopics systemTopics() { return systemTopics; } - /** - * Gets the resource collection API of Topics. It manages Topic. - * - * @return Resource collection API of Topics. - */ - public Topics topics() { - if (this.topics == null) { - this.topics = new TopicsImpl(clientObject.getTopics(), this); - } - return topics; - } - /** * Gets the resource collection API of ExtensionTopics. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java index 30d395925e87..08db51948397 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java @@ -20,43 +20,6 @@ * An instance of this class provides access to all the operations defined in DomainTopicEventSubscriptionsClient. */ public interface DomainTopicEventSubscriptionsClient { - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName); - /** * Get a nested event subscription for domain topic. * @@ -407,4 +370,41 @@ EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domain @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String domainName, String topicName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeliveryAttributesWithResponse(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription for domain topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java index 6c64aea9724d..e7ebcda2962e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java @@ -89,13 +89,6 @@ public interface EventGridManagementClient { */ DomainTopicsClient getDomainTopics(); - /** - * Gets the DomainTopicEventSubscriptionsClient object to access its operations. - * - * @return the DomainTopicEventSubscriptionsClient object. - */ - DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions(); - /** * Gets the TopicEventSubscriptionsClient object to access its operations. * @@ -110,6 +103,13 @@ public interface EventGridManagementClient { */ DomainEventSubscriptionsClient getDomainEventSubscriptions(); + /** + * Gets the NamespaceTopicEventSubscriptionsClient object to access its operations. + * + * @return the NamespaceTopicEventSubscriptionsClient object. + */ + NamespaceTopicEventSubscriptionsClient getNamespaceTopicEventSubscriptions(); + /** * Gets the EventSubscriptionsClient object to access its operations. * @@ -118,18 +118,18 @@ public interface EventGridManagementClient { EventSubscriptionsClient getEventSubscriptions(); /** - * Gets the SystemTopicEventSubscriptionsClient object to access its operations. + * Gets the DomainTopicEventSubscriptionsClient object to access its operations. * - * @return the SystemTopicEventSubscriptionsClient object. + * @return the DomainTopicEventSubscriptionsClient object. */ - SystemTopicEventSubscriptionsClient getSystemTopicEventSubscriptions(); + DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions(); /** - * Gets the NamespaceTopicEventSubscriptionsClient object to access its operations. + * Gets the SystemTopicEventSubscriptionsClient object to access its operations. * - * @return the NamespaceTopicEventSubscriptionsClient object. + * @return the SystemTopicEventSubscriptionsClient object. */ - NamespaceTopicEventSubscriptionsClient getNamespaceTopicEventSubscriptions(); + SystemTopicEventSubscriptionsClient getSystemTopicEventSubscriptions(); /** * Gets the PartnerTopicEventSubscriptionsClient object to access its operations. @@ -160,18 +160,18 @@ public interface EventGridManagementClient { OperationsClient getOperations(); /** - * Gets the PartnerConfigurationsClient object to access its operations. + * Gets the TopicsClient object to access its operations. * - * @return the PartnerConfigurationsClient object. + * @return the TopicsClient object. */ - PartnerConfigurationsClient getPartnerConfigurations(); + TopicsClient getTopics(); /** - * Gets the PartnerDestinationsClient object to access its operations. + * Gets the PartnerConfigurationsClient object to access its operations. * - * @return the PartnerDestinationsClient object. + * @return the PartnerConfigurationsClient object. */ - PartnerDestinationsClient getPartnerDestinations(); + PartnerConfigurationsClient getPartnerConfigurations(); /** * Gets the PartnerNamespacesClient object to access its operations. @@ -194,13 +194,6 @@ public interface EventGridManagementClient { */ PartnerTopicsClient getPartnerTopics(); - /** - * Gets the NetworkSecurityPerimeterConfigurationsClient object to access its operations. - * - * @return the NetworkSecurityPerimeterConfigurationsClient object. - */ - NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterConfigurations(); - /** * Gets the PermissionBindingsClient object to access its operations. * @@ -229,13 +222,6 @@ public interface EventGridManagementClient { */ SystemTopicsClient getSystemTopics(); - /** - * Gets the TopicsClient object to access its operations. - * - * @return the TopicsClient object. - */ - TopicsClient getTopics(); - /** * Gets the ExtensionTopicsClient object to access its operations. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java index 1bf427df4875..92c736f7b302 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java @@ -20,52 +20,6 @@ * An instance of this class provides access to all the operations defined in EventSubscriptionsClient. */ public interface EventSubscriptionsClient { - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse(String scope, - String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName); - /** * Get an event subscription. * @@ -841,4 +795,50 @@ PagedIterable listByDomainTopic(String resourceGroupName @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDomainTopic(String resourceGroupName, String domainName, String topicName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeliveryAttributesWithResponse(String scope, + String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NetworkSecurityPerimeterConfigurationsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NetworkSecurityPerimeterConfigurationsClient.java deleted file mode 100644 index c3f2db6d09fd..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NetworkSecurityPerimeterConfigurationsClient.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; - -/** - * An instance of this class provides access to all the operations defined in - * NetworkSecurityPerimeterConfigurationsClient. - */ -public interface NetworkSecurityPerimeterConfigurationsClient { - /** - * Get a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName, Context context); - - /** - * Get a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName); - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkSecurityPerimeterConfigurationInner> - beginReconcile(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, - String perimeterGuid, String associationName); - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkSecurityPerimeterConfigurationInner> - beginReconcile(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, - String perimeterGuid, String associationName, Context context); - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName); - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName, Context context); - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName); - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context); -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerDestinationsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerDestinationsClient.java deleted file mode 100644 index d53d678fb09a..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerDestinationsClient.java +++ /dev/null @@ -1,357 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationUpdateParameters; - -/** - * An instance of this class provides access to all the operations defined in PartnerDestinationsClient. - */ -public interface PartnerDestinationsClient { - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String partnerDestinationName, Context context); - - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PartnerDestinationInner getByResourceGroup(String resourceGroupName, String partnerDestinationName); - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerDestinationInner> beginCreateOrUpdate( - String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination); - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerDestinationInner> beginCreateOrUpdate( - String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination, - Context context); - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PartnerDestinationInner createOrUpdate(String resourceGroupName, String partnerDestinationName, - PartnerDestinationInner partnerDestination); - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PartnerDestinationInner createOrUpdate(String resourceGroupName, String partnerDestinationName, - PartnerDestinationInner partnerDestination, Context context); - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName); - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName, - Context context); - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerDestinationName); - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerDestinationName, Context context); - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerDestinationInner> beginUpdate(String resourceGroupName, - String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters); - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerDestinationInner> beginUpdate(String resourceGroupName, - String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, - Context context); - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters); - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context); - - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, Integer top, Context context); - - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); - - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response activateWithResponse(String resourceGroupName, String partnerDestinationName, - Context context); - - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PartnerDestinationInner activate(String resourceGroupName, String partnerDestinationName); -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java index a7ca8e1f09f8..f4bb82802b7e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java @@ -20,41 +20,6 @@ * An instance of this class provides access to all the operations defined in SystemTopicEventSubscriptionsClient. */ public interface SystemTopicEventSubscriptionsClient { - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse(String resourceGroupName, - String systemTopicName, String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String systemTopicName, - String eventSubscriptionName); - /** * Get an event subscription of a system topic. * @@ -387,4 +352,39 @@ EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String system @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listBySystemTopic(String resourceGroupName, String systemTopicName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeliveryAttributesWithResponse(String resourceGroupName, + String systemTopicName, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String systemTopicName, + String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureADPartnerClientAuthenticationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureADPartnerClientAuthenticationProperties.java deleted file mode 100644 index cb11cebd1f52..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureADPartnerClientAuthenticationProperties.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of an Azure Active Directory Partner Client Authentication. - */ -@Fluent -public final class AzureADPartnerClientAuthenticationProperties - implements JsonSerializable { - /* - * The Azure Active Directory Tenant ID to get the access token that will be included as the bearer token in - * delivery requests. - */ - private String azureActiveDirectoryTenantId; - - /* - * The Azure Active Directory Application ID or URI to get the access token that will be included as the bearer - * token in delivery requests. - */ - private String azureActiveDirectoryApplicationIdOrUri; - - /** - * Creates an instance of AzureADPartnerClientAuthenticationProperties class. - */ - public AzureADPartnerClientAuthenticationProperties() { - } - - /** - * Get the azureActiveDirectoryTenantId property: The Azure Active Directory Tenant ID to get the access token that - * will be included as the bearer token in delivery requests. - * - * @return the azureActiveDirectoryTenantId value. - */ - public String azureActiveDirectoryTenantId() { - return this.azureActiveDirectoryTenantId; - } - - /** - * Set the azureActiveDirectoryTenantId property: The Azure Active Directory Tenant ID to get the access token that - * will be included as the bearer token in delivery requests. - * - * @param azureActiveDirectoryTenantId the azureActiveDirectoryTenantId value to set. - * @return the AzureADPartnerClientAuthenticationProperties object itself. - */ - public AzureADPartnerClientAuthenticationProperties - withAzureActiveDirectoryTenantId(String azureActiveDirectoryTenantId) { - this.azureActiveDirectoryTenantId = azureActiveDirectoryTenantId; - return this; - } - - /** - * Get the azureActiveDirectoryApplicationIdOrUri property: The Azure Active Directory Application ID or URI to get - * the access token that will be included as the bearer token in delivery requests. - * - * @return the azureActiveDirectoryApplicationIdOrUri value. - */ - public String azureActiveDirectoryApplicationIdOrUri() { - return this.azureActiveDirectoryApplicationIdOrUri; - } - - /** - * Set the azureActiveDirectoryApplicationIdOrUri property: The Azure Active Directory Application ID or URI to get - * the access token that will be included as the bearer token in delivery requests. - * - * @param azureActiveDirectoryApplicationIdOrUri the azureActiveDirectoryApplicationIdOrUri value to set. - * @return the AzureADPartnerClientAuthenticationProperties object itself. - */ - public AzureADPartnerClientAuthenticationProperties - withAzureActiveDirectoryApplicationIdOrUri(String azureActiveDirectoryApplicationIdOrUri) { - this.azureActiveDirectoryApplicationIdOrUri = azureActiveDirectoryApplicationIdOrUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("azureActiveDirectoryTenantId", this.azureActiveDirectoryTenantId); - jsonWriter.writeStringField("azureActiveDirectoryApplicationIdOrUri", - this.azureActiveDirectoryApplicationIdOrUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureADPartnerClientAuthenticationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureADPartnerClientAuthenticationProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureADPartnerClientAuthenticationProperties. - */ - public static AzureADPartnerClientAuthenticationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureADPartnerClientAuthenticationProperties deserializedAzureADPartnerClientAuthenticationProperties - = new AzureADPartnerClientAuthenticationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("azureActiveDirectoryTenantId".equals(fieldName)) { - deserializedAzureADPartnerClientAuthenticationProperties.azureActiveDirectoryTenantId - = reader.getString(); - } else if ("azureActiveDirectoryApplicationIdOrUri".equals(fieldName)) { - deserializedAzureADPartnerClientAuthenticationProperties.azureActiveDirectoryApplicationIdOrUri - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureADPartnerClientAuthenticationProperties; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateInner.java index b2f97edddb40..b8b449ecfdc8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateInner.java @@ -25,7 +25,7 @@ public final class CaCertificateInner extends ProxyResource { private CaCertificateProperties innerProperties; /* - * The system metadata relating to the CaCertificate resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -60,7 +60,7 @@ private CaCertificateProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the CaCertificate resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelInner.java index 692a3cbcfef9..ab7c96fe005c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelInner.java @@ -12,7 +12,6 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; import com.azure.resourcemanager.eventgrid.models.ChannelType; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; import com.azure.resourcemanager.eventgrid.models.ReadinessState; import java.io.IOException; @@ -29,7 +28,7 @@ public final class ChannelInner extends ProxyResource { private ChannelProperties innerProperties; /* - * The system metadata relating to Channel resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -64,7 +63,7 @@ private ChannelProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to Channel resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -150,31 +149,6 @@ public ChannelInner withPartnerTopicInfo(PartnerTopicInfo partnerTopicInfo) { return this; } - /** - * Get the partnerDestinationInfo property: This property should be populated when channelType is PartnerDestination - * and represents information about the partner destination resource corresponding to the channel. - * - * @return the partnerDestinationInfo value. - */ - public PartnerDestinationInfo partnerDestinationInfo() { - return this.innerProperties() == null ? null : this.innerProperties().partnerDestinationInfo(); - } - - /** - * Set the partnerDestinationInfo property: This property should be populated when channelType is PartnerDestination - * and represents information about the partner destination resource corresponding to the channel. - * - * @param partnerDestinationInfo the partnerDestinationInfo value to set. - * @return the ChannelInner object itself. - */ - public ChannelInner withPartnerDestinationInfo(PartnerDestinationInfo partnerDestinationInfo) { - if (this.innerProperties() == null) { - this.innerProperties = new ChannelProperties(); - } - this.innerProperties().withPartnerDestinationInfo(partnerDestinationInfo); - return this; - } - /** * Get the messageForActivation property: Context or helpful message that can be used during the approval process by * the subscriber. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelProperties.java index 3260f46876d3..59e5b50aa78f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelProperties.java @@ -12,7 +12,6 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; import com.azure.resourcemanager.eventgrid.models.ChannelType; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; import com.azure.resourcemanager.eventgrid.models.ReadinessState; import java.io.IOException; @@ -35,12 +34,6 @@ public final class ChannelProperties implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("partnerDestinationInfo".equals(fieldName)) { - deserializedChannelUpdateParametersProperties.partnerDestinationInfo - = PartnerUpdateDestinationInfo.fromJson(reader); } else if ("partnerTopicInfo".equals(fieldName)) { deserializedChannelUpdateParametersProperties.partnerTopicInfo = PartnerUpdateTopicInfo.fromJson(reader); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupInner.java index cec3f2b3a3fd..8df3ba013b33 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupInner.java @@ -24,7 +24,7 @@ public final class ClientGroupInner extends ProxyResource { private ClientGroupProperties innerProperties; /* - * The system metadata relating to the ClientGroup resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -59,7 +59,7 @@ private ClientGroupProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the ClientGroup resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientInner.java index ca4180ec398a..ba0c34042935 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientInner.java @@ -27,7 +27,7 @@ public final class ClientInner extends ProxyResource { private ClientProperties innerProperties; /* - * The system metadata relating to the Client resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -62,7 +62,7 @@ private ClientProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Client resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainInner.java index 5d8a635219f0..e45157f67e25 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainInner.java @@ -18,7 +18,6 @@ import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceSku; import com.azure.resourcemanager.eventgrid.models.TlsVersion; import java.io.IOException; import java.util.List; @@ -34,18 +33,13 @@ public final class DomainInner extends Resource { */ private DomainProperties innerProperties; - /* - * The Sku pricing tier for the Event Grid Domain resource. - */ - private ResourceSku sku; - /* * Identity information for the Event Grid Domain resource. */ private IdentityInfo identity; /* - * The system metadata relating to the Event Grid Domain resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -79,26 +73,6 @@ private DomainProperties innerProperties() { return this.innerProperties; } - /** - * Get the sku property: The Sku pricing tier for the Event Grid Domain resource. - * - * @return the sku value. - */ - public ResourceSku sku() { - return this.sku; - } - - /** - * Set the sku property: The Sku pricing tier for the Event Grid Domain resource. - * - * @param sku the sku value to set. - * @return the DomainInner object itself. - */ - public DomainInner withSku(ResourceSku sku) { - this.sku = sku; - return this; - } - /** * Get the identity property: Identity information for the Event Grid Domain resource. * @@ -120,7 +94,7 @@ public DomainInner withIdentity(IdentityInfo identity) { } /** - * Get the systemData property: The system metadata relating to the Event Grid Domain resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -521,9 +495,6 @@ public void validate() { if (innerProperties() != null) { innerProperties().validate(); } - if (sku() != null) { - sku().validate(); - } if (identity() != null) { identity().validate(); } @@ -538,7 +509,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -572,8 +542,6 @@ public static DomainInner fromJson(JsonReader jsonReader) throws IOException { deserializedDomainInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedDomainInner.innerProperties = DomainProperties.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedDomainInner.sku = ResourceSku.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedDomainInner.identity = IdentityInfo.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicInner.java index 761356477b9f..99475d92b49c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicInner.java @@ -24,7 +24,7 @@ public final class DomainTopicInner extends ProxyResource { private DomainTopicProperties innerProperties; /* - * The system metadata relating to Domain Topic resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -59,7 +59,7 @@ private DomainTopicProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to Domain Topic resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionInner.java index 050432a1f380..97cdd1405fec 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionInner.java @@ -33,7 +33,7 @@ public final class EventSubscriptionInner extends ProxyResource { private EventSubscriptionProperties innerProperties; /* - * The system metadata relating to Event Subscription resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -68,7 +68,7 @@ private EventSubscriptionProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to Event Subscription resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeInner.java index 9ccfa277163f..33d6f77aad88 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeInner.java @@ -128,7 +128,7 @@ public EventTypeInner withDescription(String description) { } /** - * Get the schemaUrl property: Url of the schema for this event type. + * Get the schemaUrl property: URL of the schema for this event type. * * @return the schemaUrl value. */ @@ -137,7 +137,7 @@ public String schemaUrl() { } /** - * Set the schemaUrl property: Url of the schema for this event type. + * Set the schemaUrl property: URL of the schema for this event type. * * @param schemaUrl the schemaUrl value to set. * @return the EventTypeInner object itself. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeProperties.java index c94181f91799..48ede06add4d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeProperties.java @@ -27,7 +27,7 @@ public final class EventTypeProperties implements JsonSerializable provisioningIssues() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningIssues(); - } - - /** - * Set the provisioningIssues property: Provisioning issues to reflect status when attempting to retrieve nsp - * profile configuration. - * - * @param provisioningIssues the provisioningIssues value to set. - * @return the NetworkSecurityPerimeterConfigurationInner object itself. - */ - public NetworkSecurityPerimeterConfigurationInner - withProvisioningIssues(List provisioningIssues) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); - } - this.innerProperties().withProvisioningIssues(provisioningIssues); - return this; - } - - /** - * Get the networkSecurityPerimeter property: Perimeter info for nsp association. - * - * @return the networkSecurityPerimeter value. - */ - public NetworkSecurityPerimeterInfo networkSecurityPerimeter() { - return this.innerProperties() == null ? null : this.innerProperties().networkSecurityPerimeter(); - } - - /** - * Set the networkSecurityPerimeter property: Perimeter info for nsp association. - * - * @param networkSecurityPerimeter the networkSecurityPerimeter value to set. - * @return the NetworkSecurityPerimeterConfigurationInner object itself. - */ - public NetworkSecurityPerimeterConfigurationInner - withNetworkSecurityPerimeter(NetworkSecurityPerimeterInfo networkSecurityPerimeter) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); - } - this.innerProperties().withNetworkSecurityPerimeter(networkSecurityPerimeter); - return this; - } - - /** - * Get the resourceAssociation property: Nsp association name and access mode of association. - * - * @return the resourceAssociation value. - */ - public ResourceAssociation resourceAssociation() { - return this.innerProperties() == null ? null : this.innerProperties().resourceAssociation(); - } - - /** - * Set the resourceAssociation property: Nsp association name and access mode of association. - * - * @param resourceAssociation the resourceAssociation value to set. - * @return the NetworkSecurityPerimeterConfigurationInner object itself. - */ - public NetworkSecurityPerimeterConfigurationInner withResourceAssociation(ResourceAssociation resourceAssociation) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); - } - this.innerProperties().withResourceAssociation(resourceAssociation); - return this; - } - - /** - * Get the profile property: Nsp profile configuration, access rules and diagnostic settings. - * - * @return the profile value. - */ - public NetworkSecurityPerimeterConfigurationProfile profile() { - return this.innerProperties() == null ? null : this.innerProperties().profile(); - } - - /** - * Set the profile property: Nsp profile configuration, access rules and diagnostic settings. - * - * @param profile the profile value to set. - * @return the NetworkSecurityPerimeterConfigurationInner object itself. - */ - public NetworkSecurityPerimeterConfigurationInner - withProfile(NetworkSecurityPerimeterConfigurationProfile profile) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); - } - this.innerProperties().withProfile(profile); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterConfigurationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterConfigurationInner if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterConfigurationInner. - */ - public static NetworkSecurityPerimeterConfigurationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterConfigurationInner deserializedNetworkSecurityPerimeterConfigurationInner - = new NetworkSecurityPerimeterConfigurationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationInner.innerProperties - = NetworkSecurityPerimeterConfigurationProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterConfigurationInner; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationIssuesProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationIssuesProperties.java deleted file mode 100644 index 21c95de41d80..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationIssuesProperties.java +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -import java.io.IOException; -import java.util.List; - -/** - * Network security perimeter configuration issues properties. - */ -@Fluent -public final class NetworkSecurityPerimeterConfigurationIssuesProperties - implements JsonSerializable { - /* - * Provisioning issue type. - */ - private NetworkSecurityPerimeterConfigurationIssueType issueType; - - /* - * Provisioning issue severity. - */ - private NetworkSecurityPerimeterConfigurationIssueSeverity severity; - - /* - * Provisioning issue description. - */ - private String description; - - /* - * ARM IDs of resources that can be associated to the same perimeter to remediate the issue. - */ - private List suggestedResourceIds; - - /* - * Access rules that can be added to the same profile to remediate the issue. - */ - private List suggestedAccessRules; - - /** - * Creates an instance of NetworkSecurityPerimeterConfigurationIssuesProperties class. - */ - public NetworkSecurityPerimeterConfigurationIssuesProperties() { - } - - /** - * Get the issueType property: Provisioning issue type. - * - * @return the issueType value. - */ - public NetworkSecurityPerimeterConfigurationIssueType issueType() { - return this.issueType; - } - - /** - * Set the issueType property: Provisioning issue type. - * - * @param issueType the issueType value to set. - * @return the NetworkSecurityPerimeterConfigurationIssuesProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationIssuesProperties - withIssueType(NetworkSecurityPerimeterConfigurationIssueType issueType) { - this.issueType = issueType; - return this; - } - - /** - * Get the severity property: Provisioning issue severity. - * - * @return the severity value. - */ - public NetworkSecurityPerimeterConfigurationIssueSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: Provisioning issue severity. - * - * @param severity the severity value to set. - * @return the NetworkSecurityPerimeterConfigurationIssuesProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationIssuesProperties - withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the description property: Provisioning issue description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Provisioning issue description. - * - * @param description the description value to set. - * @return the NetworkSecurityPerimeterConfigurationIssuesProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationIssuesProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the suggestedResourceIds property: ARM IDs of resources that can be associated to the same perimeter to - * remediate the issue. - * - * @return the suggestedResourceIds value. - */ - public List suggestedResourceIds() { - return this.suggestedResourceIds; - } - - /** - * Set the suggestedResourceIds property: ARM IDs of resources that can be associated to the same perimeter to - * remediate the issue. - * - * @param suggestedResourceIds the suggestedResourceIds value to set. - * @return the NetworkSecurityPerimeterConfigurationIssuesProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationIssuesProperties - withSuggestedResourceIds(List suggestedResourceIds) { - this.suggestedResourceIds = suggestedResourceIds; - return this; - } - - /** - * Get the suggestedAccessRules property: Access rules that can be added to the same profile to remediate the issue. - * - * @return the suggestedAccessRules value. - */ - public List suggestedAccessRules() { - return this.suggestedAccessRules; - } - - /** - * Set the suggestedAccessRules property: Access rules that can be added to the same profile to remediate the issue. - * - * @param suggestedAccessRules the suggestedAccessRules value to set. - * @return the NetworkSecurityPerimeterConfigurationIssuesProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationIssuesProperties - withSuggestedAccessRules(List suggestedAccessRules) { - this.suggestedAccessRules = suggestedAccessRules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("issueType", this.issueType == null ? null : this.issueType.toString()); - jsonWriter.writeStringField("severity", this.severity == null ? null : this.severity.toString()); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeArrayField("suggestedResourceIds", this.suggestedResourceIds, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("suggestedAccessRules", this.suggestedAccessRules, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterConfigurationIssuesProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterConfigurationIssuesProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterConfigurationIssuesProperties. - */ - public static NetworkSecurityPerimeterConfigurationIssuesProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterConfigurationIssuesProperties deserializedNetworkSecurityPerimeterConfigurationIssuesProperties - = new NetworkSecurityPerimeterConfigurationIssuesProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("issueType".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationIssuesProperties.issueType - = NetworkSecurityPerimeterConfigurationIssueType.fromString(reader.getString()); - } else if ("severity".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationIssuesProperties.severity - = NetworkSecurityPerimeterConfigurationIssueSeverity.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationIssuesProperties.description = reader.getString(); - } else if ("suggestedResourceIds".equals(fieldName)) { - List suggestedResourceIds = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkSecurityPerimeterConfigurationIssuesProperties.suggestedResourceIds - = suggestedResourceIds; - } else if ("suggestedAccessRules".equals(fieldName)) { - List suggestedAccessRules = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkSecurityPerimeterConfigurationIssuesProperties.suggestedAccessRules - = suggestedAccessRules; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterConfigurationIssuesProperties; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java deleted file mode 100644 index 13357d6ae055..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssues; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationProfile; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import com.azure.resourcemanager.eventgrid.models.ResourceAssociation; -import java.io.IOException; -import java.util.List; - -/** - * Network security perimeter configuration information to reflect latest association and nsp profile configuration. - */ -@Fluent -public final class NetworkSecurityPerimeterConfigurationProperties - implements JsonSerializable { - /* - * Provisioning state to reflect configuration state and indicate status of nsp profile configuration retrieval. - */ - private NetworkSecurityPerimeterConfigProvisioningState provisioningState; - - /* - * Provisioning issues to reflect status when attempting to retrieve nsp profile configuration. - */ - private List provisioningIssues; - - /* - * Perimeter info for nsp association. - */ - private NetworkSecurityPerimeterInfo networkSecurityPerimeter; - - /* - * Nsp association name and access mode of association. - */ - private ResourceAssociation resourceAssociation; - - /* - * Nsp profile configuration, access rules and diagnostic settings. - */ - private NetworkSecurityPerimeterConfigurationProfile profile; - - /** - * Creates an instance of NetworkSecurityPerimeterConfigurationProperties class. - */ - public NetworkSecurityPerimeterConfigurationProperties() { - } - - /** - * Get the provisioningState property: Provisioning state to reflect configuration state and indicate status of nsp - * profile configuration retrieval. - * - * @return the provisioningState value. - */ - public NetworkSecurityPerimeterConfigProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: Provisioning state to reflect configuration state and indicate status of nsp - * profile configuration retrieval. - * - * @param provisioningState the provisioningState value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withProvisioningState(NetworkSecurityPerimeterConfigProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the provisioningIssues property: Provisioning issues to reflect status when attempting to retrieve nsp - * profile configuration. - * - * @return the provisioningIssues value. - */ - public List provisioningIssues() { - return this.provisioningIssues; - } - - /** - * Set the provisioningIssues property: Provisioning issues to reflect status when attempting to retrieve nsp - * profile configuration. - * - * @param provisioningIssues the provisioningIssues value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withProvisioningIssues(List provisioningIssues) { - this.provisioningIssues = provisioningIssues; - return this; - } - - /** - * Get the networkSecurityPerimeter property: Perimeter info for nsp association. - * - * @return the networkSecurityPerimeter value. - */ - public NetworkSecurityPerimeterInfo networkSecurityPerimeter() { - return this.networkSecurityPerimeter; - } - - /** - * Set the networkSecurityPerimeter property: Perimeter info for nsp association. - * - * @param networkSecurityPerimeter the networkSecurityPerimeter value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withNetworkSecurityPerimeter(NetworkSecurityPerimeterInfo networkSecurityPerimeter) { - this.networkSecurityPerimeter = networkSecurityPerimeter; - return this; - } - - /** - * Get the resourceAssociation property: Nsp association name and access mode of association. - * - * @return the resourceAssociation value. - */ - public ResourceAssociation resourceAssociation() { - return this.resourceAssociation; - } - - /** - * Set the resourceAssociation property: Nsp association name and access mode of association. - * - * @param resourceAssociation the resourceAssociation value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withResourceAssociation(ResourceAssociation resourceAssociation) { - this.resourceAssociation = resourceAssociation; - return this; - } - - /** - * Get the profile property: Nsp profile configuration, access rules and diagnostic settings. - * - * @return the profile value. - */ - public NetworkSecurityPerimeterConfigurationProfile profile() { - return this.profile; - } - - /** - * Set the profile property: Nsp profile configuration, access rules and diagnostic settings. - * - * @param profile the profile value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withProfile(NetworkSecurityPerimeterConfigurationProfile profile) { - this.profile = profile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (provisioningIssues() != null) { - provisioningIssues().forEach(e -> e.validate()); - } - if (networkSecurityPerimeter() != null) { - networkSecurityPerimeter().validate(); - } - if (resourceAssociation() != null) { - resourceAssociation().validate(); - } - if (profile() != null) { - profile().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("provisioningState", - this.provisioningState == null ? null : this.provisioningState.toString()); - jsonWriter.writeArrayField("provisioningIssues", this.provisioningIssues, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("networkSecurityPerimeter", this.networkSecurityPerimeter); - jsonWriter.writeJsonField("resourceAssociation", this.resourceAssociation); - jsonWriter.writeJsonField("profile", this.profile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterConfigurationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterConfigurationProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterConfigurationProperties. - */ - public static NetworkSecurityPerimeterConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterConfigurationProperties deserializedNetworkSecurityPerimeterConfigurationProperties - = new NetworkSecurityPerimeterConfigurationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationProperties.provisioningState - = NetworkSecurityPerimeterConfigProvisioningState.fromString(reader.getString()); - } else if ("provisioningIssues".equals(fieldName)) { - List provisioningIssues - = reader.readArray(reader1 -> NetworkSecurityPerimeterConfigurationIssues.fromJson(reader1)); - deserializedNetworkSecurityPerimeterConfigurationProperties.provisioningIssues = provisioningIssues; - } else if ("networkSecurityPerimeter".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationProperties.networkSecurityPerimeter - = NetworkSecurityPerimeterInfo.fromJson(reader); - } else if ("resourceAssociation".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationProperties.resourceAssociation - = ResourceAssociation.fromJson(reader); - } else if ("profile".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationProperties.profile - = NetworkSecurityPerimeterConfigurationProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterConfigurationProperties; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterProfileAccessRuleProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterProfileAccessRuleProperties.java deleted file mode 100644 index e2749f03cfbf..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterProfileAccessRuleProperties.java +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRuleDirection; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterSubscription; -import java.io.IOException; -import java.util.List; - -/** - * Network security perimeter profile access rule properties. - */ -@Fluent -public final class NetworkSecurityPerimeterProfileAccessRuleProperties - implements JsonSerializable { - /* - * NSP access rule direction. - */ - private NetworkSecurityPerimeterProfileAccessRuleDirection direction; - - /* - * Address prefixes. - */ - private List addressPrefixes; - - /* - * List of subscriptions. - */ - private List subscriptions; - - /* - * Network security perimeters. - */ - private List networkSecurityPerimeters; - - /* - * Fully qualified domain names. - */ - private List fullyQualifiedDomainNames; - - /* - * List of email addresses. - */ - private List emailAddresses; - - /* - * List of phone numbers. - */ - private List phoneNumbers; - - /** - * Creates an instance of NetworkSecurityPerimeterProfileAccessRuleProperties class. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties() { - } - - /** - * Get the direction property: NSP access rule direction. - * - * @return the direction value. - */ - public NetworkSecurityPerimeterProfileAccessRuleDirection direction() { - return this.direction; - } - - /** - * Set the direction property: NSP access rule direction. - * - * @param direction the direction value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties - withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection direction) { - this.direction = direction; - return this; - } - - /** - * Get the addressPrefixes property: Address prefixes. - * - * @return the addressPrefixes value. - */ - public List addressPrefixes() { - return this.addressPrefixes; - } - - /** - * Set the addressPrefixes property: Address prefixes. - * - * @param addressPrefixes the addressPrefixes value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties withAddressPrefixes(List addressPrefixes) { - this.addressPrefixes = addressPrefixes; - return this; - } - - /** - * Get the subscriptions property: List of subscriptions. - * - * @return the subscriptions value. - */ - public List subscriptions() { - return this.subscriptions; - } - - /** - * Set the subscriptions property: List of subscriptions. - * - * @param subscriptions the subscriptions value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties - withSubscriptions(List subscriptions) { - this.subscriptions = subscriptions; - return this; - } - - /** - * Get the networkSecurityPerimeters property: Network security perimeters. - * - * @return the networkSecurityPerimeters value. - */ - public List networkSecurityPerimeters() { - return this.networkSecurityPerimeters; - } - - /** - * Set the networkSecurityPerimeters property: Network security perimeters. - * - * @param networkSecurityPerimeters the networkSecurityPerimeters value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties - withNetworkSecurityPerimeters(List networkSecurityPerimeters) { - this.networkSecurityPerimeters = networkSecurityPerimeters; - return this; - } - - /** - * Get the fullyQualifiedDomainNames property: Fully qualified domain names. - * - * @return the fullyQualifiedDomainNames value. - */ - public List fullyQualifiedDomainNames() { - return this.fullyQualifiedDomainNames; - } - - /** - * Set the fullyQualifiedDomainNames property: Fully qualified domain names. - * - * @param fullyQualifiedDomainNames the fullyQualifiedDomainNames value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties - withFullyQualifiedDomainNames(List fullyQualifiedDomainNames) { - this.fullyQualifiedDomainNames = fullyQualifiedDomainNames; - return this; - } - - /** - * Get the emailAddresses property: List of email addresses. - * - * @return the emailAddresses value. - */ - public List emailAddresses() { - return this.emailAddresses; - } - - /** - * Set the emailAddresses property: List of email addresses. - * - * @param emailAddresses the emailAddresses value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties withEmailAddresses(List emailAddresses) { - this.emailAddresses = emailAddresses; - return this; - } - - /** - * Get the phoneNumbers property: List of phone numbers. - * - * @return the phoneNumbers value. - */ - public List phoneNumbers() { - return this.phoneNumbers; - } - - /** - * Set the phoneNumbers property: List of phone numbers. - * - * @param phoneNumbers the phoneNumbers value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties withPhoneNumbers(List phoneNumbers) { - this.phoneNumbers = phoneNumbers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (subscriptions() != null) { - subscriptions().forEach(e -> e.validate()); - } - if (networkSecurityPerimeters() != null) { - networkSecurityPerimeters().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("direction", this.direction == null ? null : this.direction.toString()); - jsonWriter.writeArrayField("addressPrefixes", this.addressPrefixes, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("subscriptions", this.subscriptions, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("networkSecurityPerimeters", this.networkSecurityPerimeters, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("fullyQualifiedDomainNames", this.fullyQualifiedDomainNames, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("emailAddresses", this.emailAddresses, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("phoneNumbers", this.phoneNumbers, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterProfileAccessRuleProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterProfileAccessRuleProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterProfileAccessRuleProperties. - */ - public static NetworkSecurityPerimeterProfileAccessRuleProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterProfileAccessRuleProperties deserializedNetworkSecurityPerimeterProfileAccessRuleProperties - = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("direction".equals(fieldName)) { - deserializedNetworkSecurityPerimeterProfileAccessRuleProperties.direction - = NetworkSecurityPerimeterProfileAccessRuleDirection.fromString(reader.getString()); - } else if ("addressPrefixes".equals(fieldName)) { - List addressPrefixes = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkSecurityPerimeterProfileAccessRuleProperties.addressPrefixes = addressPrefixes; - } else if ("subscriptions".equals(fieldName)) { - List subscriptions - = reader.readArray(reader1 -> NetworkSecurityPerimeterSubscription.fromJson(reader1)); - deserializedNetworkSecurityPerimeterProfileAccessRuleProperties.subscriptions = subscriptions; - } else if ("networkSecurityPerimeters".equals(fieldName)) { - List networkSecurityPerimeters - = reader.readArray(reader1 -> NetworkSecurityPerimeterInfo.fromJson(reader1)); - deserializedNetworkSecurityPerimeterProfileAccessRuleProperties.networkSecurityPerimeters - = networkSecurityPerimeters; - } else if ("fullyQualifiedDomainNames".equals(fieldName)) { - List fullyQualifiedDomainNames = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkSecurityPerimeterProfileAccessRuleProperties.fullyQualifiedDomainNames - = fullyQualifiedDomainNames; - } else if ("emailAddresses".equals(fieldName)) { - List emailAddresses = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkSecurityPerimeterProfileAccessRuleProperties.emailAddresses = emailAddresses; - } else if ("phoneNumbers".equals(fieldName)) { - List phoneNumbers = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkSecurityPerimeterProfileAccessRuleProperties.phoneNumbers = phoneNumbers; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterProfileAccessRuleProperties; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationInner.java index 4f53d7605091..c0863cdfebcc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationInner.java @@ -26,7 +26,7 @@ public final class PartnerConfigurationInner extends ProxyResource { private PartnerConfigurationProperties innerProperties; /* - * The system metadata relating to partner configuration resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -71,7 +71,7 @@ private PartnerConfigurationProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to partner configuration resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationInner.java deleted file mode 100644 index 8bdb1f288011..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationInner.java +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationProvisioningState; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Map; -import java.util.UUID; - -/** - * Event Grid Partner Destination. - */ -@Fluent -public final class PartnerDestinationInner extends Resource { - /* - * Properties of the Partner Destination. - */ - private PartnerDestinationProperties innerProperties; - - /* - * The system metadata relating to Partner Destination resource. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of PartnerDestinationInner class. - */ - public PartnerDestinationInner() { - } - - /** - * Get the innerProperties property: Properties of the Partner Destination. - * - * @return the innerProperties value. - */ - private PartnerDestinationProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: The system metadata relating to Partner Destination resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public PartnerDestinationInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PartnerDestinationInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner registration. - * - * @return the partnerRegistrationImmutableId value. - */ - public UUID partnerRegistrationImmutableId() { - return this.innerProperties() == null ? null : this.innerProperties().partnerRegistrationImmutableId(); - } - - /** - * Set the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner registration. - * - * @param partnerRegistrationImmutableId the partnerRegistrationImmutableId value to set. - * @return the PartnerDestinationInner object itself. - */ - public PartnerDestinationInner withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { - if (this.innerProperties() == null) { - this.innerProperties = new PartnerDestinationProperties(); - } - this.innerProperties().withPartnerRegistrationImmutableId(partnerRegistrationImmutableId); - return this; - } - - /** - * Get the endpointServiceContext property: Endpoint context associated with this partner destination. - * - * @return the endpointServiceContext value. - */ - public String endpointServiceContext() { - return this.innerProperties() == null ? null : this.innerProperties().endpointServiceContext(); - } - - /** - * Set the endpointServiceContext property: Endpoint context associated with this partner destination. - * - * @param endpointServiceContext the endpointServiceContext value to set. - * @return the PartnerDestinationInner object itself. - */ - public PartnerDestinationInner withEndpointServiceContext(String endpointServiceContext) { - if (this.innerProperties() == null) { - this.innerProperties = new PartnerDestinationProperties(); - } - this.innerProperties().withEndpointServiceContext(endpointServiceContext); - return this; - } - - /** - * Get the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If this timer - * expires and the partner destination was never activated, - * the partner destination and corresponding channel are deleted. - * - * @return the expirationTimeIfNotActivatedUtc value. - */ - public OffsetDateTime expirationTimeIfNotActivatedUtc() { - return this.innerProperties() == null ? null : this.innerProperties().expirationTimeIfNotActivatedUtc(); - } - - /** - * Set the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If this timer - * expires and the partner destination was never activated, - * the partner destination and corresponding channel are deleted. - * - * @param expirationTimeIfNotActivatedUtc the expirationTimeIfNotActivatedUtc value to set. - * @return the PartnerDestinationInner object itself. - */ - public PartnerDestinationInner withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc) { - if (this.innerProperties() == null) { - this.innerProperties = new PartnerDestinationProperties(); - } - this.innerProperties().withExpirationTimeIfNotActivatedUtc(expirationTimeIfNotActivatedUtc); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the partner destination. - * - * @return the provisioningState value. - */ - public PartnerDestinationProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the activationState property: Activation state of the partner destination. - * - * @return the activationState value. - */ - public PartnerDestinationActivationState activationState() { - return this.innerProperties() == null ? null : this.innerProperties().activationState(); - } - - /** - * Set the activationState property: Activation state of the partner destination. - * - * @param activationState the activationState value to set. - * @return the PartnerDestinationInner object itself. - */ - public PartnerDestinationInner withActivationState(PartnerDestinationActivationState activationState) { - if (this.innerProperties() == null) { - this.innerProperties = new PartnerDestinationProperties(); - } - this.innerProperties().withActivationState(activationState); - return this; - } - - /** - * Get the endpointBaseUrl property: Endpoint Base URL of the partner destination. - * - * @return the endpointBaseUrl value. - */ - public String endpointBaseUrl() { - return this.innerProperties() == null ? null : this.innerProperties().endpointBaseUrl(); - } - - /** - * Set the endpointBaseUrl property: Endpoint Base URL of the partner destination. - * - * @param endpointBaseUrl the endpointBaseUrl value to set. - * @return the PartnerDestinationInner object itself. - */ - public PartnerDestinationInner withEndpointBaseUrl(String endpointBaseUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new PartnerDestinationProperties(); - } - this.innerProperties().withEndpointBaseUrl(endpointBaseUrl); - return this; - } - - /** - * Get the messageForActivation property: Context or helpful message that can be used during the approval process. - * - * @return the messageForActivation value. - */ - public String messageForActivation() { - return this.innerProperties() == null ? null : this.innerProperties().messageForActivation(); - } - - /** - * Set the messageForActivation property: Context or helpful message that can be used during the approval process. - * - * @param messageForActivation the messageForActivation value to set. - * @return the PartnerDestinationInner object itself. - */ - public PartnerDestinationInner withMessageForActivation(String messageForActivation) { - if (this.innerProperties() == null) { - this.innerProperties = new PartnerDestinationProperties(); - } - this.innerProperties().withMessageForActivation(messageForActivation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerDestinationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerDestinationInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PartnerDestinationInner. - */ - public static PartnerDestinationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerDestinationInner deserializedPartnerDestinationInner = new PartnerDestinationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPartnerDestinationInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPartnerDestinationInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPartnerDestinationInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedPartnerDestinationInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPartnerDestinationInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedPartnerDestinationInner.innerProperties = PartnerDestinationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPartnerDestinationInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerDestinationInner; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationProperties.java deleted file mode 100644 index e23129ce7ca8..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationProperties.java +++ /dev/null @@ -1,272 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationProvisioningState; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Objects; -import java.util.UUID; - -/** - * Properties of the Partner Destination. - */ -@Fluent -public final class PartnerDestinationProperties implements JsonSerializable { - /* - * The immutable Id of the corresponding partner registration. - */ - private UUID partnerRegistrationImmutableId; - - /* - * Endpoint context associated with this partner destination. - */ - private String endpointServiceContext; - - /* - * Expiration time of the partner destination. If this timer expires and the partner destination was never - * activated, - * the partner destination and corresponding channel are deleted. - */ - private OffsetDateTime expirationTimeIfNotActivatedUtc; - - /* - * Provisioning state of the partner destination. - */ - private PartnerDestinationProvisioningState provisioningState; - - /* - * Activation state of the partner destination. - */ - private PartnerDestinationActivationState activationState; - - /* - * Endpoint Base URL of the partner destination - */ - private String endpointBaseUrl; - - /* - * Context or helpful message that can be used during the approval process. - */ - private String messageForActivation; - - /** - * Creates an instance of PartnerDestinationProperties class. - */ - public PartnerDestinationProperties() { - } - - /** - * Get the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner registration. - * - * @return the partnerRegistrationImmutableId value. - */ - public UUID partnerRegistrationImmutableId() { - return this.partnerRegistrationImmutableId; - } - - /** - * Set the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner registration. - * - * @param partnerRegistrationImmutableId the partnerRegistrationImmutableId value to set. - * @return the PartnerDestinationProperties object itself. - */ - public PartnerDestinationProperties withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { - this.partnerRegistrationImmutableId = partnerRegistrationImmutableId; - return this; - } - - /** - * Get the endpointServiceContext property: Endpoint context associated with this partner destination. - * - * @return the endpointServiceContext value. - */ - public String endpointServiceContext() { - return this.endpointServiceContext; - } - - /** - * Set the endpointServiceContext property: Endpoint context associated with this partner destination. - * - * @param endpointServiceContext the endpointServiceContext value to set. - * @return the PartnerDestinationProperties object itself. - */ - public PartnerDestinationProperties withEndpointServiceContext(String endpointServiceContext) { - this.endpointServiceContext = endpointServiceContext; - return this; - } - - /** - * Get the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If this timer - * expires and the partner destination was never activated, - * the partner destination and corresponding channel are deleted. - * - * @return the expirationTimeIfNotActivatedUtc value. - */ - public OffsetDateTime expirationTimeIfNotActivatedUtc() { - return this.expirationTimeIfNotActivatedUtc; - } - - /** - * Set the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If this timer - * expires and the partner destination was never activated, - * the partner destination and corresponding channel are deleted. - * - * @param expirationTimeIfNotActivatedUtc the expirationTimeIfNotActivatedUtc value to set. - * @return the PartnerDestinationProperties object itself. - */ - public PartnerDestinationProperties - withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc) { - this.expirationTimeIfNotActivatedUtc = expirationTimeIfNotActivatedUtc; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the partner destination. - * - * @return the provisioningState value. - */ - public PartnerDestinationProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the activationState property: Activation state of the partner destination. - * - * @return the activationState value. - */ - public PartnerDestinationActivationState activationState() { - return this.activationState; - } - - /** - * Set the activationState property: Activation state of the partner destination. - * - * @param activationState the activationState value to set. - * @return the PartnerDestinationProperties object itself. - */ - public PartnerDestinationProperties withActivationState(PartnerDestinationActivationState activationState) { - this.activationState = activationState; - return this; - } - - /** - * Get the endpointBaseUrl property: Endpoint Base URL of the partner destination. - * - * @return the endpointBaseUrl value. - */ - public String endpointBaseUrl() { - return this.endpointBaseUrl; - } - - /** - * Set the endpointBaseUrl property: Endpoint Base URL of the partner destination. - * - * @param endpointBaseUrl the endpointBaseUrl value to set. - * @return the PartnerDestinationProperties object itself. - */ - public PartnerDestinationProperties withEndpointBaseUrl(String endpointBaseUrl) { - this.endpointBaseUrl = endpointBaseUrl; - return this; - } - - /** - * Get the messageForActivation property: Context or helpful message that can be used during the approval process. - * - * @return the messageForActivation value. - */ - public String messageForActivation() { - return this.messageForActivation; - } - - /** - * Set the messageForActivation property: Context or helpful message that can be used during the approval process. - * - * @param messageForActivation the messageForActivation value to set. - * @return the PartnerDestinationProperties object itself. - */ - public PartnerDestinationProperties withMessageForActivation(String messageForActivation) { - this.messageForActivation = messageForActivation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("partnerRegistrationImmutableId", - Objects.toString(this.partnerRegistrationImmutableId, null)); - jsonWriter.writeStringField("endpointServiceContext", this.endpointServiceContext); - jsonWriter.writeStringField("expirationTimeIfNotActivatedUtc", - this.expirationTimeIfNotActivatedUtc == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationTimeIfNotActivatedUtc)); - jsonWriter.writeStringField("activationState", - this.activationState == null ? null : this.activationState.toString()); - jsonWriter.writeStringField("endpointBaseUrl", this.endpointBaseUrl); - jsonWriter.writeStringField("messageForActivation", this.messageForActivation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerDestinationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerDestinationProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartnerDestinationProperties. - */ - public static PartnerDestinationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerDestinationProperties deserializedPartnerDestinationProperties = new PartnerDestinationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("partnerRegistrationImmutableId".equals(fieldName)) { - deserializedPartnerDestinationProperties.partnerRegistrationImmutableId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("endpointServiceContext".equals(fieldName)) { - deserializedPartnerDestinationProperties.endpointServiceContext = reader.getString(); - } else if ("expirationTimeIfNotActivatedUtc".equals(fieldName)) { - deserializedPartnerDestinationProperties.expirationTimeIfNotActivatedUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedPartnerDestinationProperties.provisioningState - = PartnerDestinationProvisioningState.fromString(reader.getString()); - } else if ("activationState".equals(fieldName)) { - deserializedPartnerDestinationProperties.activationState - = PartnerDestinationActivationState.fromString(reader.getString()); - } else if ("endpointBaseUrl".equals(fieldName)) { - deserializedPartnerDestinationProperties.endpointBaseUrl = reader.getString(); - } else if ("messageForActivation".equals(fieldName)) { - deserializedPartnerDestinationProperties.messageForActivation = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerDestinationProperties; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerEventSubscriptionDestinationProperties.java deleted file mode 100644 index 2c5a9e1f01d7..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerEventSubscriptionDestinationProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The PartnerEventSubscriptionDestinationProperties model. - */ -@Fluent -public final class PartnerEventSubscriptionDestinationProperties - implements JsonSerializable { - /* - * The Azure Resource Id that represents the endpoint of a Partner Destination of an event subscription. - */ - private String resourceId; - - /** - * Creates an instance of PartnerEventSubscriptionDestinationProperties class. - */ - public PartnerEventSubscriptionDestinationProperties() { - } - - /** - * Get the resourceId property: The Azure Resource Id that represents the endpoint of a Partner Destination of an - * event subscription. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: The Azure Resource Id that represents the endpoint of a Partner Destination of an - * event subscription. - * - * @param resourceId the resourceId value to set. - * @return the PartnerEventSubscriptionDestinationProperties object itself. - */ - public PartnerEventSubscriptionDestinationProperties withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceId", this.resourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerEventSubscriptionDestinationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerEventSubscriptionDestinationProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartnerEventSubscriptionDestinationProperties. - */ - public static PartnerEventSubscriptionDestinationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerEventSubscriptionDestinationProperties deserializedPartnerEventSubscriptionDestinationProperties - = new PartnerEventSubscriptionDestinationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceId".equals(fieldName)) { - deserializedPartnerEventSubscriptionDestinationProperties.resourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerEventSubscriptionDestinationProperties; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceInner.java index 4f255e5dd197..39fdd1c869ed 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceInner.java @@ -30,7 +30,7 @@ public final class PartnerNamespaceInner extends Resource { private PartnerNamespaceProperties innerProperties; /* - * The system metadata relating to Partner Namespace resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -65,7 +65,7 @@ private PartnerNamespaceProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to Partner Namespace resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerRegistrationInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerRegistrationInner.java index 3a3a853c9fab..de3739dc71e7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerRegistrationInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerRegistrationInner.java @@ -26,7 +26,7 @@ public final class PartnerRegistrationInner extends Resource { private PartnerRegistrationProperties innerProperties; /* - * The system metadata relating to Partner Registration resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -61,7 +61,7 @@ private PartnerRegistrationProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to Partner Registration resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerTopicInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerTopicInner.java index 87fa62213e0b..c30705edf482 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerTopicInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerTopicInner.java @@ -30,7 +30,7 @@ public final class PartnerTopicInner extends Resource { private PartnerTopicProperties innerProperties; /* - * The system metadata relating to Partner Topic resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -70,7 +70,7 @@ private PartnerTopicProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to Partner Topic resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PermissionBindingInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PermissionBindingInner.java index 05cc60f1526b..1de668e279cf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PermissionBindingInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PermissionBindingInner.java @@ -25,7 +25,7 @@ public final class PermissionBindingInner extends ProxyResource { private PermissionBindingProperties innerProperties; /* - * The system metadata relating to the PermissionBinding resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -60,7 +60,7 @@ private PermissionBindingProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the PermissionBinding resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionInner.java index c6f43c663c66..71782b9ba522 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionInner.java @@ -28,7 +28,7 @@ public final class SubscriptionInner extends ProxyResource { private SubscriptionProperties innerProperties; /* - * The system metadata relating to Event Subscription resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -63,7 +63,7 @@ private SubscriptionProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to Event Subscription resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicInner.java index 8ac9c352e9c8..26dae4262c4e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicInner.java @@ -26,7 +26,7 @@ public final class SystemTopicInner extends Resource { private SystemTopicProperties innerProperties; /* - * The system metadata relating to System Topic resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -66,7 +66,7 @@ private SystemTopicProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to System Topic resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicInner.java index 1c1b6b223ca4..f7e548c789c0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicInner.java @@ -12,14 +12,11 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; import com.azure.resourcemanager.eventgrid.models.IdentityInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceKind; -import com.azure.resourcemanager.eventgrid.models.ResourceSku; import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.azure.resourcemanager.eventgrid.models.TopicProvisioningState; import java.io.IOException; @@ -36,28 +33,13 @@ public final class TopicInner extends Resource { */ private TopicProperties innerProperties; - /* - * The Sku pricing tier for the topic. - */ - private ResourceSku sku; - /* * Identity information for the resource. */ private IdentityInfo identity; /* - * Kind of the resource. - */ - private ResourceKind kind; - - /* - * Extended location of the resource. - */ - private ExtendedLocation extendedLocation; - - /* - * The system metadata relating to Topic resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -91,26 +73,6 @@ private TopicProperties innerProperties() { return this.innerProperties; } - /** - * Get the sku property: The Sku pricing tier for the topic. - * - * @return the sku value. - */ - public ResourceSku sku() { - return this.sku; - } - - /** - * Set the sku property: The Sku pricing tier for the topic. - * - * @param sku the sku value to set. - * @return the TopicInner object itself. - */ - public TopicInner withSku(ResourceSku sku) { - this.sku = sku; - return this; - } - /** * Get the identity property: Identity information for the resource. * @@ -132,47 +94,7 @@ public TopicInner withIdentity(IdentityInfo identity) { } /** - * Get the kind property: Kind of the resource. - * - * @return the kind value. - */ - public ResourceKind kind() { - return this.kind; - } - - /** - * Set the kind property: Kind of the resource. - * - * @param kind the kind value to set. - * @return the TopicInner object itself. - */ - public TopicInner withKind(ResourceKind kind) { - this.kind = kind; - return this; - } - - /** - * Get the extendedLocation property: Extended location of the resource. - * - * @return the extendedLocation value. - */ - public ExtendedLocation extendedLocation() { - return this.extendedLocation; - } - - /** - * Set the extendedLocation property: Extended location of the resource. - * - * @param extendedLocation the extendedLocation value to set. - * @return the TopicInner object itself. - */ - public TopicInner withExtendedLocation(ExtendedLocation extendedLocation) { - this.extendedLocation = extendedLocation; - return this; - } - - /** - * Get the systemData property: The system metadata relating to Topic resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -479,15 +401,9 @@ public void validate() { if (innerProperties() != null) { innerProperties().validate(); } - if (sku() != null) { - sku().validate(); - } if (identity() != null) { identity().validate(); } - if (extendedLocation() != null) { - extendedLocation().validate(); - } } /** @@ -499,10 +415,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -535,14 +448,8 @@ public static TopicInner fromJson(JsonReader jsonReader) throws IOException { deserializedTopicInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedTopicInner.innerProperties = TopicProperties.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedTopicInner.sku = ResourceSku.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedTopicInner.identity = IdentityInfo.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedTopicInner.kind = ResourceKind.fromString(reader.getString()); - } else if ("extendedLocation".equals(fieldName)) { - deserializedTopicInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedTopicInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceInner.java index 9bb2ebbb2e1a..b64f8bdba866 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceInner.java @@ -25,7 +25,7 @@ public final class TopicSpaceInner extends ProxyResource { private TopicSpaceProperties innerProperties; /* - * The system metadata relating to the TopicSpace resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -60,7 +60,7 @@ private TopicSpaceProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the TopicSpace resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerInner.java index 23dfe124d04b..d15e266f3c81 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerInner.java @@ -26,7 +26,7 @@ public final class VerifiedPartnerInner extends ProxyResource { private VerifiedPartnerProperties innerProperties; /* - * The system metadata relating to Verified Partner resource. + * The system metadata relating to the Event Grid resource. */ private SystemData systemData; @@ -61,7 +61,7 @@ private VerifiedPartnerProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to Verified Partner resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -191,29 +191,6 @@ public VerifiedPartnerInner withPartnerTopicDetails(PartnerDetails partnerTopicD return this; } - /** - * Get the partnerDestinationDetails property: Details of the partner destination scenario. - * - * @return the partnerDestinationDetails value. - */ - public PartnerDetails partnerDestinationDetails() { - return this.innerProperties() == null ? null : this.innerProperties().partnerDestinationDetails(); - } - - /** - * Set the partnerDestinationDetails property: Details of the partner destination scenario. - * - * @param partnerDestinationDetails the partnerDestinationDetails value to set. - * @return the VerifiedPartnerInner object itself. - */ - public VerifiedPartnerInner withPartnerDestinationDetails(PartnerDetails partnerDestinationDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new VerifiedPartnerProperties(); - } - this.innerProperties().withPartnerDestinationDetails(partnerDestinationDetails); - return this; - } - /** * Get the provisioningState property: Provisioning state of the verified partner. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerProperties.java index 640e1839d218..9b73cd0c9438 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerProperties.java @@ -40,11 +40,6 @@ public final class VerifiedPartnerProperties implements JsonSerializable { - /* - * The URL that represents the endpoint of the partner destination. - */ - private String endpointUrl; - - /* - * The base URL that represents the endpoint of the partner destination. - */ - private String endpointBaseUrl; - - /* - * Partner client authentication - */ - private PartnerClientAuthentication clientAuthentication; - - /** - * Creates an instance of WebhookPartnerDestinationProperties class. - */ - public WebhookPartnerDestinationProperties() { - } - - /** - * Get the endpointUrl property: The URL that represents the endpoint of the partner destination. - * - * @return the endpointUrl value. - */ - public String endpointUrl() { - return this.endpointUrl; - } - - /** - * Set the endpointUrl property: The URL that represents the endpoint of the partner destination. - * - * @param endpointUrl the endpointUrl value to set. - * @return the WebhookPartnerDestinationProperties object itself. - */ - public WebhookPartnerDestinationProperties withEndpointUrl(String endpointUrl) { - this.endpointUrl = endpointUrl; - return this; - } - - /** - * Get the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. - * - * @return the endpointBaseUrl value. - */ - public String endpointBaseUrl() { - return this.endpointBaseUrl; - } - - /** - * Set the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. - * - * @param endpointBaseUrl the endpointBaseUrl value to set. - * @return the WebhookPartnerDestinationProperties object itself. - */ - public WebhookPartnerDestinationProperties withEndpointBaseUrl(String endpointBaseUrl) { - this.endpointBaseUrl = endpointBaseUrl; - return this; - } - - /** - * Get the clientAuthentication property: Partner client authentication. - * - * @return the clientAuthentication value. - */ - public PartnerClientAuthentication clientAuthentication() { - return this.clientAuthentication; - } - - /** - * Set the clientAuthentication property: Partner client authentication. - * - * @param clientAuthentication the clientAuthentication value to set. - * @return the WebhookPartnerDestinationProperties object itself. - */ - public WebhookPartnerDestinationProperties - withClientAuthentication(PartnerClientAuthentication clientAuthentication) { - this.clientAuthentication = clientAuthentication; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clientAuthentication() != null) { - clientAuthentication().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("endpointUrl", this.endpointUrl); - jsonWriter.writeStringField("endpointBaseUrl", this.endpointBaseUrl); - jsonWriter.writeJsonField("clientAuthentication", this.clientAuthentication); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebhookPartnerDestinationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebhookPartnerDestinationProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WebhookPartnerDestinationProperties. - */ - public static WebhookPartnerDestinationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebhookPartnerDestinationProperties deserializedWebhookPartnerDestinationProperties - = new WebhookPartnerDestinationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("endpointUrl".equals(fieldName)) { - deserializedWebhookPartnerDestinationProperties.endpointUrl = reader.getString(); - } else if ("endpointBaseUrl".equals(fieldName)) { - deserializedWebhookPartnerDestinationProperties.endpointBaseUrl = reader.getString(); - } else if ("clientAuthentication".equals(fieldName)) { - deserializedWebhookPartnerDestinationProperties.clientAuthentication - = PartnerClientAuthentication.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWebhookPartnerDestinationProperties; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java index 3e1ea3a071f9..21d70f8e5bed 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; import com.azure.resourcemanager.eventgrid.models.ChannelType; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; import com.azure.resourcemanager.eventgrid.models.ReadinessState; import java.time.OffsetDateTime; @@ -46,10 +45,6 @@ public PartnerTopicInfo partnerTopicInfo() { return this.innerModel().partnerTopicInfo(); } - public PartnerDestinationInfo partnerDestinationInfo() { - return this.innerModel().partnerDestinationInfo(); - } - public String messageForActivation() { return this.innerModel().messageForActivation(); } @@ -179,11 +174,6 @@ public ChannelImpl withPartnerTopicInfo(PartnerTopicInfo partnerTopicInfo) { return this; } - public ChannelImpl withPartnerDestinationInfo(PartnerDestinationInfo partnerDestinationInfo) { - this.innerModel().withPartnerDestinationInfo(partnerDestinationInfo); - return this; - } - public ChannelImpl withMessageForActivation(String messageForActivation) { this.innerModel().withMessageForActivation(messageForActivation); return this; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java index 8d7eb937ca16..904d9a450d9d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java @@ -23,7 +23,6 @@ import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnection; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceSku; import com.azure.resourcemanager.eventgrid.models.TlsVersion; import java.util.Collections; import java.util.List; @@ -60,10 +59,6 @@ public Map tags() { } } - public ResourceSku sku() { - return this.innerModel().sku(); - } - public IdentityInfo identity() { return this.innerModel().identity(); } @@ -271,16 +266,6 @@ public DomainImpl withTags(Map tags) { } } - public DomainImpl withSku(ResourceSku sku) { - if (isInCreateMode()) { - this.innerModel().withSku(sku); - return this; - } else { - this.updateDomainUpdateParameters.withSku(sku); - return this; - } - } - public DomainImpl withIdentity(IdentityInfo identity) { if (isInCreateMode()) { this.innerModel().withIdentity(identity); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsClientImpl.java index 86d12c1db3e6..6cec79b5e9db 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsClientImpl.java @@ -75,16 +75,6 @@ public final class DomainTopicEventSubscriptionsClientImpl implements DomainTopi @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") public interface DomainTopicEventSubscriptionsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @@ -150,6 +140,16 @@ Mono> list(@HostParam("$host") String end @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, + @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -159,167 +159,6 @@ Mono> listNext( @HeaderParam("Accept") String accept, Context context); } - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getDeliveryAttributes(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, - context); - } - - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDeliveryAttributesAsync(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName, Context context) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName, - context).block(); - } - - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName) { - return getDeliveryAttributesWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, - Context.NONE).getValue(); - } - /** * Get a nested event subscription for domain topic. * @@ -1746,6 +1585,167 @@ public PagedIterable list(String resourceGroupName, Stri return new PagedIterable<>(listAsync(resourceGroupName, domainName, topicName, filter, top, context)); } + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription for domain topic along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription for domain topic along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getDeliveryAttributes(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, + context); + } + + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription for domain topic on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeliveryAttributesAsync(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName, Context context) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName, + context).block(); + } + + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription for domain topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, + Context.NONE).getValue(); + } + /** * Get the next page of items. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java index b1edf8ed312d..7562430e06c4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java @@ -32,30 +32,6 @@ public DomainTopicEventSubscriptionsImpl(DomainTopicEventSubscriptionsClient inn this.serviceManager = serviceManager; } - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName, Context context) { - Response inner = this.serviceClient() - .getDeliveryAttributesWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, - context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName) { - DeliveryAttributeListResultInner inner = this.serviceClient() - .getDeliveryAttributes(resourceGroupName, domainName, topicName, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { Response inner = this.serviceClient() @@ -171,6 +147,30 @@ public PagedIterable list(String resourceGroupName, String do return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName, Context context) { + Response inner = this.serviceClient() + .getDeliveryAttributesWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, + context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName) { + DeliveryAttributeListResultInner inner = this.serviceClient() + .getDeliveryAttributes(resourceGroupName, domainName, topicName, eventSubscriptionName); + if (inner != null) { + return new DeliveryAttributeListResultImpl(inner, this.manager()); + } else { + return null; + } + } + private DomainTopicEventSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java index ab30b2b4b3a5..871179b8bec3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java @@ -37,10 +37,8 @@ import com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient; import com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient; import com.azure.resourcemanager.eventgrid.fluent.NamespacesClient; -import com.azure.resourcemanager.eventgrid.fluent.NetworkSecurityPerimeterConfigurationsClient; import com.azure.resourcemanager.eventgrid.fluent.OperationsClient; import com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient; -import com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient; import com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient; import com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient; import com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient; @@ -239,20 +237,6 @@ public DomainTopicsClient getDomainTopics() { return this.domainTopics; } - /** - * The DomainTopicEventSubscriptionsClient object to access its operations. - */ - private final DomainTopicEventSubscriptionsClient domainTopicEventSubscriptions; - - /** - * Gets the DomainTopicEventSubscriptionsClient object to access its operations. - * - * @return the DomainTopicEventSubscriptionsClient object. - */ - public DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions() { - return this.domainTopicEventSubscriptions; - } - /** * The TopicEventSubscriptionsClient object to access its operations. */ @@ -281,6 +265,20 @@ public DomainEventSubscriptionsClient getDomainEventSubscriptions() { return this.domainEventSubscriptions; } + /** + * The NamespaceTopicEventSubscriptionsClient object to access its operations. + */ + private final NamespaceTopicEventSubscriptionsClient namespaceTopicEventSubscriptions; + + /** + * Gets the NamespaceTopicEventSubscriptionsClient object to access its operations. + * + * @return the NamespaceTopicEventSubscriptionsClient object. + */ + public NamespaceTopicEventSubscriptionsClient getNamespaceTopicEventSubscriptions() { + return this.namespaceTopicEventSubscriptions; + } + /** * The EventSubscriptionsClient object to access its operations. */ @@ -296,31 +294,31 @@ public EventSubscriptionsClient getEventSubscriptions() { } /** - * The SystemTopicEventSubscriptionsClient object to access its operations. + * The DomainTopicEventSubscriptionsClient object to access its operations. */ - private final SystemTopicEventSubscriptionsClient systemTopicEventSubscriptions; + private final DomainTopicEventSubscriptionsClient domainTopicEventSubscriptions; /** - * Gets the SystemTopicEventSubscriptionsClient object to access its operations. + * Gets the DomainTopicEventSubscriptionsClient object to access its operations. * - * @return the SystemTopicEventSubscriptionsClient object. + * @return the DomainTopicEventSubscriptionsClient object. */ - public SystemTopicEventSubscriptionsClient getSystemTopicEventSubscriptions() { - return this.systemTopicEventSubscriptions; + public DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions() { + return this.domainTopicEventSubscriptions; } /** - * The NamespaceTopicEventSubscriptionsClient object to access its operations. + * The SystemTopicEventSubscriptionsClient object to access its operations. */ - private final NamespaceTopicEventSubscriptionsClient namespaceTopicEventSubscriptions; + private final SystemTopicEventSubscriptionsClient systemTopicEventSubscriptions; /** - * Gets the NamespaceTopicEventSubscriptionsClient object to access its operations. + * Gets the SystemTopicEventSubscriptionsClient object to access its operations. * - * @return the NamespaceTopicEventSubscriptionsClient object. + * @return the SystemTopicEventSubscriptionsClient object. */ - public NamespaceTopicEventSubscriptionsClient getNamespaceTopicEventSubscriptions() { - return this.namespaceTopicEventSubscriptions; + public SystemTopicEventSubscriptionsClient getSystemTopicEventSubscriptions() { + return this.systemTopicEventSubscriptions; } /** @@ -380,31 +378,31 @@ public OperationsClient getOperations() { } /** - * The PartnerConfigurationsClient object to access its operations. + * The TopicsClient object to access its operations. */ - private final PartnerConfigurationsClient partnerConfigurations; + private final TopicsClient topics; /** - * Gets the PartnerConfigurationsClient object to access its operations. + * Gets the TopicsClient object to access its operations. * - * @return the PartnerConfigurationsClient object. + * @return the TopicsClient object. */ - public PartnerConfigurationsClient getPartnerConfigurations() { - return this.partnerConfigurations; + public TopicsClient getTopics() { + return this.topics; } /** - * The PartnerDestinationsClient object to access its operations. + * The PartnerConfigurationsClient object to access its operations. */ - private final PartnerDestinationsClient partnerDestinations; + private final PartnerConfigurationsClient partnerConfigurations; /** - * Gets the PartnerDestinationsClient object to access its operations. + * Gets the PartnerConfigurationsClient object to access its operations. * - * @return the PartnerDestinationsClient object. + * @return the PartnerConfigurationsClient object. */ - public PartnerDestinationsClient getPartnerDestinations() { - return this.partnerDestinations; + public PartnerConfigurationsClient getPartnerConfigurations() { + return this.partnerConfigurations; } /** @@ -449,20 +447,6 @@ public PartnerTopicsClient getPartnerTopics() { return this.partnerTopics; } - /** - * The NetworkSecurityPerimeterConfigurationsClient object to access its operations. - */ - private final NetworkSecurityPerimeterConfigurationsClient networkSecurityPerimeterConfigurations; - - /** - * Gets the NetworkSecurityPerimeterConfigurationsClient object to access its operations. - * - * @return the NetworkSecurityPerimeterConfigurationsClient object. - */ - public NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterConfigurations() { - return this.networkSecurityPerimeterConfigurations; - } - /** * The PermissionBindingsClient object to access its operations. */ @@ -519,20 +503,6 @@ public SystemTopicsClient getSystemTopics() { return this.systemTopics; } - /** - * The TopicsClient object to access its operations. - */ - private final TopicsClient topics; - - /** - * Gets the TopicsClient object to access its operations. - * - * @return the TopicsClient object. - */ - public TopicsClient getTopics() { - return this.topics; - } - /** * The ExtensionTopicsClient object to access its operations. */ @@ -607,34 +577,32 @@ public VerifiedPartnersClient getVerifiedPartners() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-06-01-preview"; + this.apiVersion = "2025-02-15"; this.caCertificates = new CaCertificatesClientImpl(this); this.channels = new ChannelsClientImpl(this); this.clientGroups = new ClientGroupsClientImpl(this); this.clients = new ClientsClientImpl(this); this.domains = new DomainsClientImpl(this); this.domainTopics = new DomainTopicsClientImpl(this); - this.domainTopicEventSubscriptions = new DomainTopicEventSubscriptionsClientImpl(this); this.topicEventSubscriptions = new TopicEventSubscriptionsClientImpl(this); this.domainEventSubscriptions = new DomainEventSubscriptionsClientImpl(this); + this.namespaceTopicEventSubscriptions = new NamespaceTopicEventSubscriptionsClientImpl(this); this.eventSubscriptions = new EventSubscriptionsClientImpl(this); + this.domainTopicEventSubscriptions = new DomainTopicEventSubscriptionsClientImpl(this); this.systemTopicEventSubscriptions = new SystemTopicEventSubscriptionsClientImpl(this); - this.namespaceTopicEventSubscriptions = new NamespaceTopicEventSubscriptionsClientImpl(this); this.partnerTopicEventSubscriptions = new PartnerTopicEventSubscriptionsClientImpl(this); this.namespaces = new NamespacesClientImpl(this); this.namespaceTopics = new NamespaceTopicsClientImpl(this); this.operations = new OperationsClientImpl(this); + this.topics = new TopicsClientImpl(this); this.partnerConfigurations = new PartnerConfigurationsClientImpl(this); - this.partnerDestinations = new PartnerDestinationsClientImpl(this); this.partnerNamespaces = new PartnerNamespacesClientImpl(this); this.partnerRegistrations = new PartnerRegistrationsClientImpl(this); this.partnerTopics = new PartnerTopicsClientImpl(this); - this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsClientImpl(this); this.permissionBindings = new PermissionBindingsClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.systemTopics = new SystemTopicsClientImpl(this); - this.topics = new TopicsClientImpl(this); this.extensionTopics = new ExtensionTopicsClientImpl(this); this.topicSpaces = new TopicSpacesClientImpl(this); this.topicTypes = new TopicTypesClientImpl(this); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsClientImpl.java index 08f7b7edb4ff..b683bc4bf0c8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsClientImpl.java @@ -75,15 +75,6 @@ public final class EventSubscriptionsClientImpl implements EventSubscriptionsCli @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") public interface EventSubscriptionsService { - @Headers({ "Content-Type: application/json" }) - @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @@ -235,6 +226,15 @@ Mono> listByDomainTopic(@HostParam("$host @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, + @PathParam(value = "scope", encoded = true) String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -316,164 +316,6 @@ Mono> listByDomainTopicNext( @HeaderParam("Accept") String accept, Context context); } - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync(String scope, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), scope, - eventSubscriptionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync(String scope, - String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getDeliveryAttributes(this.client.getEndpoint(), scope, eventSubscriptionName, - this.client.getApiVersion(), accept, context); - } - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDeliveryAttributesAsync(String scope, - String eventSubscriptionName) { - return getDeliveryAttributesWithResponseAsync(scope, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse(String scope, - String eventSubscriptionName, Context context) { - return getDeliveryAttributesWithResponseAsync(scope, eventSubscriptionName, context).block(); - } - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName) { - return getDeliveryAttributesWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); - } - /** * Get an event subscription. * @@ -3878,6 +3720,164 @@ public PagedIterable listByDomainTopic(String resourceGr listByDomainTopicAsync(resourceGroupName, domainName, topicName, filter, top, context)); } + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync(String scope, + String eventSubscriptionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scope == null) { + return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), scope, + eventSubscriptionName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync(String scope, + String eventSubscriptionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scope == null) { + return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getDeliveryAttributes(this.client.getEndpoint(), scope, eventSubscriptionName, + this.client.getApiVersion(), accept, context); + } + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeliveryAttributesAsync(String scope, + String eventSubscriptionName) { + return getDeliveryAttributesWithResponseAsync(scope, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeliveryAttributesWithResponse(String scope, + String eventSubscriptionName, Context context) { + return getDeliveryAttributesWithResponseAsync(scope, eventSubscriptionName, context).block(); + } + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName) { + return getDeliveryAttributesWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); + } + /** * Get the next page of items. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsImpl.java index c79d5d0b1b67..e112aa6cb649 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsImpl.java @@ -32,28 +32,6 @@ public EventSubscriptionsImpl(EventSubscriptionsClient innerClient, this.serviceManager = serviceManager; } - public Response getDeliveryAttributesWithResponse(String scope, - String eventSubscriptionName, Context context) { - Response inner - = this.serviceClient().getDeliveryAttributesWithResponse(scope, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName) { - DeliveryAttributeListResultInner inner - = this.serviceClient().getDeliveryAttributes(scope, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String scope, String eventSubscriptionName, Context context) { Response inner = this.serviceClient().getWithResponse(scope, eventSubscriptionName, context); @@ -277,6 +255,28 @@ public PagedIterable listByDomainTopic(String resourceGroupNa return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } + public Response getDeliveryAttributesWithResponse(String scope, + String eventSubscriptionName, Context context) { + Response inner + = this.serviceClient().getDeliveryAttributesWithResponse(scope, eventSubscriptionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName) { + DeliveryAttributeListResultInner inner + = this.serviceClient().getDeliveryAttributes(scope, eventSubscriptionName); + if (inner != null) { + return new DeliveryAttributeListResultImpl(inner, this.manager()); + } else { + return null; + } + } + private EventSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationImpl.java deleted file mode 100644 index 50f1c04cc832..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.implementation; - -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfiguration; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssues; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationProfile; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import com.azure.resourcemanager.eventgrid.models.ResourceAssociation; -import java.util.Collections; -import java.util.List; - -public final class NetworkSecurityPerimeterConfigurationImpl implements NetworkSecurityPerimeterConfiguration { - private NetworkSecurityPerimeterConfigurationInner innerObject; - - private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; - - NetworkSecurityPerimeterConfigurationImpl(NetworkSecurityPerimeterConfigurationInner innerObject, - com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public NetworkSecurityPerimeterConfigProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public List provisioningIssues() { - List inner = this.innerModel().provisioningIssues(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public NetworkSecurityPerimeterInfo networkSecurityPerimeter() { - return this.innerModel().networkSecurityPerimeter(); - } - - public ResourceAssociation resourceAssociation() { - return this.innerModel().resourceAssociation(); - } - - public NetworkSecurityPerimeterConfigurationProfile profile() { - return this.innerModel().profile(); - } - - public NetworkSecurityPerimeterConfigurationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.eventgrid.EventGridManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java deleted file mode 100644 index 6b71e7d6ceb4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java +++ /dev/null @@ -1,773 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.eventgrid.fluent.NetworkSecurityPerimeterConfigurationsClient; -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationList; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * NetworkSecurityPerimeterConfigurationsClient. - */ -public final class NetworkSecurityPerimeterConfigurationsClientImpl - implements NetworkSecurityPerimeterConfigurationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final NetworkSecurityPerimeterConfigurationsService service; - - /** - * The service client containing this operation class. - */ - private final EventGridManagementClientImpl client; - - /** - * Initializes an instance of NetworkSecurityPerimeterConfigurationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - NetworkSecurityPerimeterConfigurationsClientImpl(EventGridManagementClientImpl client) { - this.service = RestProxy.create(NetworkSecurityPerimeterConfigurationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for EventGridManagementClientNetworkSecurityPerimeterConfigurations to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "EventGridManagementC") - public interface NetworkSecurityPerimeterConfigurationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceType") NetworkSecurityPerimeterResourceType resourceType, - @PathParam("resourceName") String resourceName, @PathParam("perimeterGuid") String perimeterGuid, - @PathParam("associationName") String associationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName}/reconcile") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reconcile(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceType") NetworkSecurityPerimeterResourceType resourceType, - @PathParam("resourceName") String resourceName, @PathParam("perimeterGuid") String perimeterGuid, - @PathParam("associationName") String associationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceType") NetworkSecurityPerimeterResourceType resourceType, - @PathParam("resourceName") String resourceName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (perimeterGuid == null) { - return Mono.error(new IllegalArgumentException("Parameter perimeterGuid is required and cannot be null.")); - } - if (associationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (perimeterGuid == null) { - return Mono.error(new IllegalArgumentException("Parameter perimeterGuid is required and cannot be null.")); - } - if (associationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, resourceType, - resourceName, perimeterGuid, associationName, this.client.getApiVersion(), accept, context); - } - - /** - * Get a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName) { - return getWithResponseAsync(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, - context).block(); - } - - /** - * Get a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName) { - return getWithResponse(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, - Context.NONE).getValue(); - } - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reconcileWithResponseAsync(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (perimeterGuid == null) { - return Mono.error(new IllegalArgumentException("Parameter perimeterGuid is required and cannot be null.")); - } - if (associationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.reconcile(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reconcileWithResponseAsync(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (perimeterGuid == null) { - return Mono.error(new IllegalArgumentException("Parameter perimeterGuid is required and cannot be null.")); - } - if (associationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.reconcile(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceType, resourceName, perimeterGuid, associationName, this.client.getApiVersion(), accept, context); - } - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, NetworkSecurityPerimeterConfigurationInner> - beginReconcileAsync(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, - String resourceName, String perimeterGuid, String associationName) { - Mono>> mono - = reconcileWithResponseAsync(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), NetworkSecurityPerimeterConfigurationInner.class, - NetworkSecurityPerimeterConfigurationInner.class, this.client.getContext()); - } - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, NetworkSecurityPerimeterConfigurationInner> - beginReconcileAsync(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, - String resourceName, String perimeterGuid, String associationName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = reconcileWithResponseAsync(resourceGroupName, resourceType, - resourceName, perimeterGuid, associationName, context); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), NetworkSecurityPerimeterConfigurationInner.class, - NetworkSecurityPerimeterConfigurationInner.class, context); - } - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, NetworkSecurityPerimeterConfigurationInner> - beginReconcile(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, - String perimeterGuid, String associationName) { - return this.beginReconcileAsync(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName) - .getSyncPoller(); - } - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, NetworkSecurityPerimeterConfigurationInner> - beginReconcile(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, - String perimeterGuid, String associationName, Context context) { - return this - .beginReconcileAsync(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, context) - .getSyncPoller(); - } - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reconcileAsync(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName) { - return beginReconcileAsync(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reconcileAsync(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName, Context context) { - return beginReconcileAsync(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName) { - return reconcileAsync(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName).block(); - } - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName, Context context) { - return reconcileAsync(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, context) - .block(); - } - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceType, resourceName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, resourceType, - resourceName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); - } - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceType, resourceName)); - } - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceType, resourceName, context)); - } - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceType, resourceName)); - } - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceType, resourceName, context)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java deleted file mode 100644 index 3c5277cf48c6..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.eventgrid.fluent.NetworkSecurityPerimeterConfigurationsClient; -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfiguration; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurations; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; - -public final class NetworkSecurityPerimeterConfigurationsImpl implements NetworkSecurityPerimeterConfigurations { - private static final ClientLogger LOGGER = new ClientLogger(NetworkSecurityPerimeterConfigurationsImpl.class); - - private final NetworkSecurityPerimeterConfigurationsClient innerClient; - - private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; - - public NetworkSecurityPerimeterConfigurationsImpl(NetworkSecurityPerimeterConfigurationsClient innerClient, - com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkSecurityPerimeterConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NetworkSecurityPerimeterConfiguration get(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName) { - NetworkSecurityPerimeterConfigurationInner inner - = this.serviceClient().get(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName); - if (inner != null) { - return new NetworkSecurityPerimeterConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName) { - NetworkSecurityPerimeterConfigurationInner inner = this.serviceClient() - .reconcile(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName); - if (inner != null) { - return new NetworkSecurityPerimeterConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName, Context context) { - NetworkSecurityPerimeterConfigurationInner inner = this.serviceClient() - .reconcile(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, context); - if (inner != null) { - return new NetworkSecurityPerimeterConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, resourceType, resourceName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, resourceType, resourceName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); - } - - private NetworkSecurityPerimeterConfigurationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.eventgrid.EventGridManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java deleted file mode 100644 index c67df06244e9..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; -import com.azure.resourcemanager.eventgrid.models.PartnerDestination; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationProvisioningState; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationUpdateParameters; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.Map; -import java.util.UUID; - -public final class PartnerDestinationImpl - implements PartnerDestination, PartnerDestination.Definition, PartnerDestination.Update { - private PartnerDestinationInner innerObject; - - private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public UUID partnerRegistrationImmutableId() { - return this.innerModel().partnerRegistrationImmutableId(); - } - - public String endpointServiceContext() { - return this.innerModel().endpointServiceContext(); - } - - public OffsetDateTime expirationTimeIfNotActivatedUtc() { - return this.innerModel().expirationTimeIfNotActivatedUtc(); - } - - public PartnerDestinationProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public PartnerDestinationActivationState activationState() { - return this.innerModel().activationState(); - } - - public String endpointBaseUrl() { - return this.innerModel().endpointBaseUrl(); - } - - public String messageForActivation() { - return this.innerModel().messageForActivation(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public PartnerDestinationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.eventgrid.EventGridManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String partnerDestinationName; - - private PartnerDestinationUpdateParameters updatePartnerDestinationUpdateParameters; - - public PartnerDestinationImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public PartnerDestination create() { - this.innerObject = serviceManager.serviceClient() - .getPartnerDestinations() - .createOrUpdate(resourceGroupName, partnerDestinationName, this.innerModel(), Context.NONE); - return this; - } - - public PartnerDestination create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPartnerDestinations() - .createOrUpdate(resourceGroupName, partnerDestinationName, this.innerModel(), context); - return this; - } - - PartnerDestinationImpl(String name, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { - this.innerObject = new PartnerDestinationInner(); - this.serviceManager = serviceManager; - this.partnerDestinationName = name; - } - - public PartnerDestinationImpl update() { - this.updatePartnerDestinationUpdateParameters = new PartnerDestinationUpdateParameters(); - return this; - } - - public PartnerDestination apply() { - this.innerObject = serviceManager.serviceClient() - .getPartnerDestinations() - .update(resourceGroupName, partnerDestinationName, updatePartnerDestinationUpdateParameters, Context.NONE); - return this; - } - - public PartnerDestination apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPartnerDestinations() - .update(resourceGroupName, partnerDestinationName, updatePartnerDestinationUpdateParameters, context); - return this; - } - - PartnerDestinationImpl(PartnerDestinationInner innerObject, - com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.partnerDestinationName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "partnerDestinations"); - } - - public PartnerDestination refresh() { - this.innerObject = serviceManager.serviceClient() - .getPartnerDestinations() - .getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, Context.NONE) - .getValue(); - return this; - } - - public PartnerDestination refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPartnerDestinations() - .getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, context) - .getValue(); - return this; - } - - public Response activateWithResponse(Context context) { - return serviceManager.partnerDestinations() - .activateWithResponse(resourceGroupName, partnerDestinationName, context); - } - - public PartnerDestination activate() { - return serviceManager.partnerDestinations().activate(resourceGroupName, partnerDestinationName); - } - - public PartnerDestinationImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public PartnerDestinationImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public PartnerDestinationImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updatePartnerDestinationUpdateParameters.withTags(tags); - return this; - } - } - - public PartnerDestinationImpl withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { - this.innerModel().withPartnerRegistrationImmutableId(partnerRegistrationImmutableId); - return this; - } - - public PartnerDestinationImpl withEndpointServiceContext(String endpointServiceContext) { - this.innerModel().withEndpointServiceContext(endpointServiceContext); - return this; - } - - public PartnerDestinationImpl withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc) { - this.innerModel().withExpirationTimeIfNotActivatedUtc(expirationTimeIfNotActivatedUtc); - return this; - } - - public PartnerDestinationImpl withActivationState(PartnerDestinationActivationState activationState) { - this.innerModel().withActivationState(activationState); - return this; - } - - public PartnerDestinationImpl withEndpointBaseUrl(String endpointBaseUrl) { - this.innerModel().withEndpointBaseUrl(endpointBaseUrl); - return this; - } - - public PartnerDestinationImpl withMessageForActivation(String messageForActivation) { - this.innerModel().withMessageForActivation(messageForActivation); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsClientImpl.java deleted file mode 100644 index 55283ae61a98..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsClientImpl.java +++ /dev/null @@ -1,1672 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationUpdateParameters; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationsListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PartnerDestinationsClient. - */ -public final class PartnerDestinationsClientImpl implements PartnerDestinationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final PartnerDestinationsService service; - - /** - * The service client containing this operation class. - */ - private final EventGridManagementClientImpl client; - - /** - * Initializes an instance of PartnerDestinationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PartnerDestinationsClientImpl(EventGridManagementClientImpl client) { - this.service = RestProxy.create(PartnerDestinationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for EventGridManagementClientPartnerDestinations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "EventGridManagementC") - public interface PartnerDestinationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerDestinationInner partnerDestination, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") - @ExpectedResponses({ 200, 201, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}/activate") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> activate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String partnerDestinationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerDestinationName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String partnerDestinationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), accept, context); - } - - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String partnerDestinationName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, partnerDestinationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String partnerDestinationName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, partnerDestinationName, context).block(); - } - - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerDestinationInner getByResourceGroup(String resourceGroupName, String partnerDestinationName) { - return getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, Context.NONE).getValue(); - } - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String partnerDestinationName, PartnerDestinationInner partnerDestination) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - if (partnerDestination == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerDestination is required and cannot be null.")); - } else { - partnerDestination.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerDestinationName, this.client.getApiVersion(), partnerDestination, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String partnerDestinationName, PartnerDestinationInner partnerDestination, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - if (partnerDestination == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerDestination is required and cannot be null.")); - } else { - partnerDestination.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), partnerDestination, accept, context); - } - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PartnerDestinationInner> beginCreateOrUpdateAsync( - String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, partnerDestinationName, partnerDestination); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PartnerDestinationInner.class, PartnerDestinationInner.class, - this.client.getContext()); - } - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PartnerDestinationInner> beginCreateOrUpdateAsync( - String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, partnerDestinationName, partnerDestination, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PartnerDestinationInner.class, PartnerDestinationInner.class, context); - } - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerDestinationInner> beginCreateOrUpdate( - String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { - return this.beginCreateOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination) - .getSyncPoller(); - } - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerDestinationInner> beginCreateOrUpdate( - String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination, context) - .getSyncPoller(); - } - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String partnerDestinationName, - PartnerDestinationInner partnerDestination) { - return beginCreateOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String partnerDestinationName, - PartnerDestinationInner partnerDestination, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerDestinationInner createOrUpdate(String resourceGroupName, String partnerDestinationName, - PartnerDestinationInner partnerDestination) { - return createOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination).block(); - } - - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerDestinationInner createOrUpdate(String resourceGroupName, String partnerDestinationName, - PartnerDestinationInner partnerDestination, Context context) { - return createOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination, context).block(); - } - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String partnerDestinationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerDestinationName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String partnerDestinationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String partnerDestinationName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, partnerDestinationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String partnerDestinationName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, partnerDestinationName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName) { - return this.beginDeleteAsync(resourceGroupName, partnerDestinationName).getSyncPoller(); - } - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, partnerDestinationName, context).getSyncPoller(); - } - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String partnerDestinationName) { - return beginDeleteAsync(resourceGroupName, partnerDestinationName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String partnerDestinationName, Context context) { - return beginDeleteAsync(resourceGroupName, partnerDestinationName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String partnerDestinationName) { - deleteAsync(resourceGroupName, partnerDestinationName).block(); - } - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String partnerDestinationName, Context context) { - deleteAsync(resourceGroupName, partnerDestinationName, context).block(); - } - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - if (partnerDestinationUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter partnerDestinationUpdateParameters is required and cannot be null.")); - } else { - partnerDestinationUpdateParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerDestinationName, this.client.getApiVersion(), - partnerDestinationUpdateParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - if (partnerDestinationUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter partnerDestinationUpdateParameters is required and cannot be null.")); - } else { - partnerDestinationUpdateParameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), partnerDestinationUpdateParameters, accept, context); - } - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PartnerDestinationInner> beginUpdateAsync( - String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PartnerDestinationInner.class, PartnerDestinationInner.class, - this.client.getContext()); - } - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PartnerDestinationInner> beginUpdateAsync( - String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, partnerDestinationName, - partnerDestinationUpdateParameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PartnerDestinationInner.class, PartnerDestinationInner.class, context); - } - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerDestinationInner> beginUpdate( - String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - return this.beginUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters) - .getSyncPoller(); - } - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerDestinationInner> beginUpdate( - String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context) { - return this - .beginUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, context) - .getSyncPoller(); - } - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - return beginUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - return updateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters).block(); - } - - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context) { - return updateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, context) - .block(); - } - - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Integer top, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String filter = null; - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Integer top, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, top, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String filter = null; - final Integer top = null; - return new PagedIterable<>(listAsync(filter, top)); - } - - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Integer top, Context context) { - return new PagedIterable<>(listAsync(filter, top, context)); - } - - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), filter, top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, - Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String filter = null; - final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, - Integer top, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String filter = null; - final Integer top = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, top)); - } - - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, - Integer top, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, top, context)); - } - - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> activateWithResponseAsync(String resourceGroupName, - String partnerDestinationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.activate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerDestinationName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> activateWithResponseAsync(String resourceGroupName, - String partnerDestinationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.activate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), accept, context); - } - - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono activateAsync(String resourceGroupName, String partnerDestinationName) { - return activateWithResponseAsync(resourceGroupName, partnerDestinationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response activateWithResponse(String resourceGroupName, - String partnerDestinationName, Context context) { - return activateWithResponseAsync(resourceGroupName, partnerDestinationName, context).block(); - } - - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerDestinationInner activate(String resourceGroupName, String partnerDestinationName) { - return activateWithResponse(resourceGroupName, partnerDestinationName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java deleted file mode 100644 index 80e0d7126b37..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; -import com.azure.resourcemanager.eventgrid.models.PartnerDestination; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinations; - -public final class PartnerDestinationsImpl implements PartnerDestinations { - private static final ClientLogger LOGGER = new ClientLogger(PartnerDestinationsImpl.class); - - private final PartnerDestinationsClient innerClient; - - private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; - - public PartnerDestinationsImpl(PartnerDestinationsClient innerClient, - com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, - String partnerDestinationName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerDestinationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PartnerDestination getByResourceGroup(String resourceGroupName, String partnerDestinationName) { - PartnerDestinationInner inner - = this.serviceClient().getByResourceGroup(resourceGroupName, partnerDestinationName); - if (inner != null) { - return new PartnerDestinationImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String partnerDestinationName) { - this.serviceClient().delete(resourceGroupName, partnerDestinationName); - } - - public void delete(String resourceGroupName, String partnerDestinationName, Context context) { - this.serviceClient().delete(resourceGroupName, partnerDestinationName, context); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); - } - - public Response activateWithResponse(String resourceGroupName, String partnerDestinationName, - Context context) { - Response inner - = this.serviceClient().activateWithResponse(resourceGroupName, partnerDestinationName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerDestinationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PartnerDestination activate(String resourceGroupName, String partnerDestinationName) { - PartnerDestinationInner inner = this.serviceClient().activate(resourceGroupName, partnerDestinationName); - if (inner != null) { - return new PartnerDestinationImpl(inner, this.manager()); - } else { - return null; - } - } - - public PartnerDestination getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerDestinationName = ResourceManagerUtils.getValueFromIdByName(id, "partnerDestinations"); - if (partnerDestinationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerDestinationName = ResourceManagerUtils.getValueFromIdByName(id, "partnerDestinations"); - if (partnerDestinationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerDestinationName = ResourceManagerUtils.getValueFromIdByName(id, "partnerDestinations"); - if (partnerDestinationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); - } - this.delete(resourceGroupName, partnerDestinationName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerDestinationName = ResourceManagerUtils.getValueFromIdByName(id, "partnerDestinations"); - if (partnerDestinationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); - } - this.delete(resourceGroupName, partnerDestinationName, context); - } - - private PartnerDestinationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.eventgrid.EventGridManager manager() { - return this.serviceManager; - } - - public PartnerDestinationImpl define(String name) { - return new PartnerDestinationImpl(name, this.manager()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsClientImpl.java index c9c29e288d8d..0e5c3107643d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsClientImpl.java @@ -75,17 +75,6 @@ public final class SystemTopicEventSubscriptionsClientImpl implements SystemTopi @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") public interface SystemTopicEventSubscriptionsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @@ -156,6 +145,17 @@ Mono> listBySystemTopic(@HostParam("$host @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("systemTopicName") String systemTopicName, + @PathParam("eventSubscriptionName") String eventSubscriptionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -165,156 +165,6 @@ Mono> listBySystemTopicNext( @HeaderParam("Accept") String accept, Context context); } - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getDeliveryAttributes(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDeliveryAttributesAsync(String resourceGroupName, - String systemTopicName, String eventSubscriptionName) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String systemTopicName, String eventSubscriptionName, Context context) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName, - context).block(); - } - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String systemTopicName, - String eventSubscriptionName) { - return getDeliveryAttributesWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, - Context.NONE).getValue(); - } - /** * Get an event subscription of a system topic. * @@ -1671,6 +1521,156 @@ public PagedIterable listBySystemTopic(String resourceGr return new PagedIterable<>(listBySystemTopicAsync(resourceGroupName, systemTopicName, filter, top, context)); } + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (systemTopicName == null) { + return Mono + .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (systemTopicName == null) { + return Mono + .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getDeliveryAttributes(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, systemTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); + } + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeliveryAttributesAsync(String resourceGroupName, + String systemTopicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String systemTopicName, String eventSubscriptionName, Context context) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName, + context).block(); + } + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String systemTopicName, + String eventSubscriptionName) { + return getDeliveryAttributesWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, + Context.NONE).getValue(); + } + /** * Get the next page of items. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java index 17addb277fca..fbb70059a7f9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java @@ -32,29 +32,6 @@ public SystemTopicEventSubscriptionsImpl(SystemTopicEventSubscriptionsClient inn this.serviceManager = serviceManager; } - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String systemTopicName, String eventSubscriptionName, Context context) { - Response inner = this.serviceClient() - .getDeliveryAttributesWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String systemTopicName, - String eventSubscriptionName) { - DeliveryAttributeListResultInner inner - = this.serviceClient().getDeliveryAttributes(resourceGroupName, systemTopicName, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { Response inner @@ -167,6 +144,29 @@ public PagedIterable listBySystemTopic(String resourceGroupNa return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String systemTopicName, String eventSubscriptionName, Context context) { + Response inner = this.serviceClient() + .getDeliveryAttributesWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String systemTopicName, + String eventSubscriptionName) { + DeliveryAttributeListResultInner inner + = this.serviceClient().getDeliveryAttributes(resourceGroupName, systemTopicName, eventSubscriptionName); + if (inner != null) { + return new DeliveryAttributeListResultImpl(inner, this.manager()); + } else { + return null; + } + } + private SystemTopicEventSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java index e1ab979e6515..48064f18645e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java @@ -12,15 +12,12 @@ import com.azure.resourcemanager.eventgrid.fluent.models.TopicInner; import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; import com.azure.resourcemanager.eventgrid.models.IdentityInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnection; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceKind; -import com.azure.resourcemanager.eventgrid.models.ResourceSku; import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.azure.resourcemanager.eventgrid.models.Topic; import com.azure.resourcemanager.eventgrid.models.TopicProvisioningState; @@ -62,22 +59,10 @@ public Map tags() { } } - public ResourceSku sku() { - return this.innerModel().sku(); - } - public IdentityInfo identity() { return this.innerModel().identity(); } - public ResourceKind kind() { - return this.innerModel().kind(); - } - - public ExtendedLocation extendedLocation() { - return this.innerModel().extendedLocation(); - } - public SystemData systemData() { return this.innerModel().systemData(); } @@ -271,16 +256,6 @@ public TopicImpl withTags(Map tags) { } } - public TopicImpl withSku(ResourceSku sku) { - if (isInCreateMode()) { - this.innerModel().withSku(sku); - return this; - } else { - this.updateTopicUpdateParameters.withSku(sku); - return this; - } - } - public TopicImpl withIdentity(IdentityInfo identity) { if (isInCreateMode()) { this.innerModel().withIdentity(identity); @@ -291,16 +266,6 @@ public TopicImpl withIdentity(IdentityInfo identity) { } } - public TopicImpl withKind(ResourceKind kind) { - this.innerModel().withKind(kind); - return this; - } - - public TopicImpl withExtendedLocation(ExtendedLocation extendedLocation) { - this.innerModel().withExtendedLocation(extendedLocation); - return this; - } - public TopicImpl withEventTypeInfo(EventTypeInfo eventTypeInfo) { if (isInCreateMode()) { this.innerModel().withEventTypeInfo(eventTypeInfo); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java index bf6b8e44375b..b28b2bd62202 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java @@ -54,10 +54,6 @@ public PartnerDetails partnerTopicDetails() { return this.innerModel().partnerTopicDetails(); } - public PartnerDetails partnerDestinationDetails() { - return this.innerModel().partnerDestinationDetails(); - } - public VerifiedPartnerProvisioningState provisioningState() { return this.innerModel().provisioningState(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AlternativeAuthenticationNameSource.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AlternativeAuthenticationNameSource.java deleted file mode 100644 index fc53c6536c89..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AlternativeAuthenticationNameSource.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Alternative authentication name sources related to client authentication settings for namespace resource. - */ -public final class AlternativeAuthenticationNameSource - extends ExpandableStringEnum { - /** - * Static value ClientCertificateSubject for AlternativeAuthenticationNameSource. - */ - public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_SUBJECT - = fromString("ClientCertificateSubject"); - - /** - * Static value ClientCertificateDns for AlternativeAuthenticationNameSource. - */ - public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_DNS = fromString("ClientCertificateDns"); - - /** - * Static value ClientCertificateUri for AlternativeAuthenticationNameSource. - */ - public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_URI = fromString("ClientCertificateUri"); - - /** - * Static value ClientCertificateIp for AlternativeAuthenticationNameSource. - */ - public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_IP = fromString("ClientCertificateIp"); - - /** - * Static value ClientCertificateEmail for AlternativeAuthenticationNameSource. - */ - public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_EMAIL - = fromString("ClientCertificateEmail"); - - /** - * Creates a new instance of AlternativeAuthenticationNameSource value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AlternativeAuthenticationNameSource() { - } - - /** - * Creates or finds a AlternativeAuthenticationNameSource from its string representation. - * - * @param name a name to look for. - * @return the corresponding AlternativeAuthenticationNameSource. - */ - public static AlternativeAuthenticationNameSource fromString(String name) { - return fromString(name, AlternativeAuthenticationNameSource.class); - } - - /** - * Gets known AlternativeAuthenticationNameSource values. - * - * @return known AlternativeAuthenticationNameSource values. - */ - public static Collection values() { - return values(AlternativeAuthenticationNameSource.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureADPartnerClientAuthentication.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureADPartnerClientAuthentication.java deleted file mode 100644 index 090089a75058..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureADPartnerClientAuthentication.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.fluent.models.AzureADPartnerClientAuthenticationProperties; -import java.io.IOException; - -/** - * Azure Active Directory Partner Client Authentication. - */ -@Fluent -public final class AzureADPartnerClientAuthentication extends PartnerClientAuthentication { - /* - * Type of client authentication - */ - private PartnerClientAuthenticationType clientAuthenticationType = PartnerClientAuthenticationType.AZURE_AD; - - /* - * AzureAD ClientAuthentication Properties - */ - private AzureADPartnerClientAuthenticationProperties innerProperties; - - /** - * Creates an instance of AzureADPartnerClientAuthentication class. - */ - public AzureADPartnerClientAuthentication() { - } - - /** - * Get the clientAuthenticationType property: Type of client authentication. - * - * @return the clientAuthenticationType value. - */ - @Override - public PartnerClientAuthenticationType clientAuthenticationType() { - return this.clientAuthenticationType; - } - - /** - * Get the innerProperties property: AzureAD ClientAuthentication Properties. - * - * @return the innerProperties value. - */ - private AzureADPartnerClientAuthenticationProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the azureActiveDirectoryTenantId property: The Azure Active Directory Tenant ID to get the access token that - * will be included as the bearer token in delivery requests. - * - * @return the azureActiveDirectoryTenantId value. - */ - public String azureActiveDirectoryTenantId() { - return this.innerProperties() == null ? null : this.innerProperties().azureActiveDirectoryTenantId(); - } - - /** - * Set the azureActiveDirectoryTenantId property: The Azure Active Directory Tenant ID to get the access token that - * will be included as the bearer token in delivery requests. - * - * @param azureActiveDirectoryTenantId the azureActiveDirectoryTenantId value to set. - * @return the AzureADPartnerClientAuthentication object itself. - */ - public AzureADPartnerClientAuthentication withAzureActiveDirectoryTenantId(String azureActiveDirectoryTenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new AzureADPartnerClientAuthenticationProperties(); - } - this.innerProperties().withAzureActiveDirectoryTenantId(azureActiveDirectoryTenantId); - return this; - } - - /** - * Get the azureActiveDirectoryApplicationIdOrUri property: The Azure Active Directory Application ID or URI to get - * the access token that will be included as the bearer token in delivery requests. - * - * @return the azureActiveDirectoryApplicationIdOrUri value. - */ - public String azureActiveDirectoryApplicationIdOrUri() { - return this.innerProperties() == null ? null : this.innerProperties().azureActiveDirectoryApplicationIdOrUri(); - } - - /** - * Set the azureActiveDirectoryApplicationIdOrUri property: The Azure Active Directory Application ID or URI to get - * the access token that will be included as the bearer token in delivery requests. - * - * @param azureActiveDirectoryApplicationIdOrUri the azureActiveDirectoryApplicationIdOrUri value to set. - * @return the AzureADPartnerClientAuthentication object itself. - */ - public AzureADPartnerClientAuthentication - withAzureActiveDirectoryApplicationIdOrUri(String azureActiveDirectoryApplicationIdOrUri) { - if (this.innerProperties() == null) { - this.innerProperties = new AzureADPartnerClientAuthenticationProperties(); - } - this.innerProperties().withAzureActiveDirectoryApplicationIdOrUri(azureActiveDirectoryApplicationIdOrUri); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clientAuthenticationType", - this.clientAuthenticationType == null ? null : this.clientAuthenticationType.toString()); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureADPartnerClientAuthentication from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureADPartnerClientAuthentication if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureADPartnerClientAuthentication. - */ - public static AzureADPartnerClientAuthentication fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureADPartnerClientAuthentication deserializedAzureADPartnerClientAuthentication - = new AzureADPartnerClientAuthentication(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clientAuthenticationType".equals(fieldName)) { - deserializedAzureADPartnerClientAuthentication.clientAuthenticationType - = PartnerClientAuthenticationType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedAzureADPartnerClientAuthentication.innerProperties - = AzureADPartnerClientAuthenticationProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureADPartnerClientAuthentication; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificate.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificate.java index f88ea170c189..8c8fcd9156c1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificate.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificate.java @@ -35,7 +35,7 @@ public interface CaCertificate { String type(); /** - * Gets the systemData property: The system metadata relating to the CaCertificate resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channel.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channel.java index 4315166e4371..9cc11cd54249 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channel.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channel.java @@ -36,7 +36,7 @@ public interface Channel { String type(); /** - * Gets the systemData property: The system metadata relating to Channel resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -57,15 +57,6 @@ public interface Channel { */ PartnerTopicInfo partnerTopicInfo(); - /** - * Gets the partnerDestinationInfo property: This property should be populated when channelType is - * PartnerDestination and represents information about the partner destination resource corresponding to the - * channel. - * - * @return the partnerDestinationInfo value. - */ - PartnerDestinationInfo partnerDestinationInfo(); - /** * Gets the messageForActivation property: Context or helpful message that can be used during the approval process * by the subscriber. @@ -147,9 +138,8 @@ interface WithParentResource { * created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithChannelType, DefinitionStages.WithPartnerTopicInfo, - DefinitionStages.WithPartnerDestinationInfo, DefinitionStages.WithMessageForActivation, - DefinitionStages.WithProvisioningState, DefinitionStages.WithReadinessState, - DefinitionStages.WithExpirationTimeIfNotActivatedUtc { + DefinitionStages.WithMessageForActivation, DefinitionStages.WithProvisioningState, + DefinitionStages.WithReadinessState, DefinitionStages.WithExpirationTimeIfNotActivatedUtc { /** * Executes the create request. * @@ -195,22 +185,6 @@ interface WithPartnerTopicInfo { WithCreate withPartnerTopicInfo(PartnerTopicInfo partnerTopicInfo); } - /** - * The stage of the Channel definition allowing to specify partnerDestinationInfo. - */ - interface WithPartnerDestinationInfo { - /** - * Specifies the partnerDestinationInfo property: This property should be populated when channelType is - * PartnerDestination and represents information about the partner destination resource corresponding to the - * channel.. - * - * @param partnerDestinationInfo This property should be populated when channelType is PartnerDestination - * and represents information about the partner destination resource corresponding to the channel. - * @return the next definition stage. - */ - WithCreate withPartnerDestinationInfo(PartnerDestinationInfo partnerDestinationInfo); - } - /** * The stage of the Channel definition allowing to specify messageForActivation. */ @@ -281,8 +255,7 @@ interface WithExpirationTimeIfNotActivatedUtc { * The template for Channel update. */ interface Update extends UpdateStages.WithChannelType, UpdateStages.WithPartnerTopicInfo, - UpdateStages.WithPartnerDestinationInfo, UpdateStages.WithMessageForActivation, - UpdateStages.WithProvisioningState, UpdateStages.WithReadinessState, + UpdateStages.WithMessageForActivation, UpdateStages.WithProvisioningState, UpdateStages.WithReadinessState, UpdateStages.WithExpirationTimeIfNotActivatedUtc { /** * Executes the update request. @@ -333,22 +306,6 @@ interface WithPartnerTopicInfo { Update withPartnerTopicInfo(PartnerTopicInfo partnerTopicInfo); } - /** - * The stage of the Channel update allowing to specify partnerDestinationInfo. - */ - interface WithPartnerDestinationInfo { - /** - * Specifies the partnerDestinationInfo property: This property should be populated when channelType is - * PartnerDestination and represents information about the partner destination resource corresponding to the - * channel.. - * - * @param partnerDestinationInfo This property should be populated when channelType is PartnerDestination - * and represents information about the partner destination resource corresponding to the channel. - * @return the next definition stage. - */ - Update withPartnerDestinationInfo(PartnerDestinationInfo partnerDestinationInfo); - } - /** * The stage of the Channel update allowing to specify messageForActivation. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelProvisioningState.java index d26c465ef449..9bb69dc136da 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelProvisioningState.java @@ -47,12 +47,6 @@ public final class ChannelProvisioningState extends ExpandableStringEnum { */ public static final ChannelType PARTNER_TOPIC = fromString("PartnerTopic"); - /** - * Static value PartnerDestination for ChannelType. - */ - public static final ChannelType PARTNER_DESTINATION = fromString("PartnerDestination"); - /** * Creates a new instance of ChannelType value. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelUpdateParameters.java index bf423d3be649..6f9faca1fc5d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelUpdateParameters.java @@ -65,31 +65,6 @@ public ChannelUpdateParameters withExpirationTimeIfNotActivatedUtc(OffsetDateTim return this; } - /** - * Get the partnerDestinationInfo property: Partner destination properties which can be updated if the channel is of - * type PartnerDestination. - * - * @return the partnerDestinationInfo value. - */ - public PartnerUpdateDestinationInfo partnerDestinationInfo() { - return this.innerProperties() == null ? null : this.innerProperties().partnerDestinationInfo(); - } - - /** - * Set the partnerDestinationInfo property: Partner destination properties which can be updated if the channel is of - * type PartnerDestination. - * - * @param partnerDestinationInfo the partnerDestinationInfo value to set. - * @return the ChannelUpdateParameters object itself. - */ - public ChannelUpdateParameters withPartnerDestinationInfo(PartnerUpdateDestinationInfo partnerDestinationInfo) { - if (this.innerProperties() == null) { - this.innerProperties = new ChannelUpdateParametersProperties(); - } - this.innerProperties().withPartnerDestinationInfo(partnerDestinationInfo); - return this; - } - /** * Get the partnerTopicInfo property: Partner topic properties which can be updated if the channel is of type * PartnerTopic. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Client.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Client.java index 49fe70227a52..b97f92b8dd81 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Client.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Client.java @@ -35,7 +35,7 @@ public interface Client { String type(); /** - * Gets the systemData property: The system metadata relating to the Client resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientAuthenticationSettings.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientAuthenticationSettings.java deleted file mode 100644 index 6285e069c2e8..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientAuthenticationSettings.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Client authentication settings for namespace resource. - */ -@Fluent -public final class ClientAuthenticationSettings implements JsonSerializable { - /* - * Alternative authentication name sources related to client authentication settings for namespace resource. - */ - private List alternativeAuthenticationNameSources; - - /* - * Custom JWT authentication settings for namespace resource. - */ - private CustomJwtAuthenticationSettings customJwtAuthentication; - - /** - * Creates an instance of ClientAuthenticationSettings class. - */ - public ClientAuthenticationSettings() { - } - - /** - * Get the alternativeAuthenticationNameSources property: Alternative authentication name sources related to client - * authentication settings for namespace resource. - * - * @return the alternativeAuthenticationNameSources value. - */ - public List alternativeAuthenticationNameSources() { - return this.alternativeAuthenticationNameSources; - } - - /** - * Set the alternativeAuthenticationNameSources property: Alternative authentication name sources related to client - * authentication settings for namespace resource. - * - * @param alternativeAuthenticationNameSources the alternativeAuthenticationNameSources value to set. - * @return the ClientAuthenticationSettings object itself. - */ - public ClientAuthenticationSettings withAlternativeAuthenticationNameSources( - List alternativeAuthenticationNameSources) { - this.alternativeAuthenticationNameSources = alternativeAuthenticationNameSources; - return this; - } - - /** - * Get the customJwtAuthentication property: Custom JWT authentication settings for namespace resource. - * - * @return the customJwtAuthentication value. - */ - public CustomJwtAuthenticationSettings customJwtAuthentication() { - return this.customJwtAuthentication; - } - - /** - * Set the customJwtAuthentication property: Custom JWT authentication settings for namespace resource. - * - * @param customJwtAuthentication the customJwtAuthentication value to set. - * @return the ClientAuthenticationSettings object itself. - */ - public ClientAuthenticationSettings - withCustomJwtAuthentication(CustomJwtAuthenticationSettings customJwtAuthentication) { - this.customJwtAuthentication = customJwtAuthentication; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customJwtAuthentication() != null) { - customJwtAuthentication().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("alternativeAuthenticationNameSources", this.alternativeAuthenticationNameSources, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeJsonField("customJwtAuthentication", this.customJwtAuthentication); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClientAuthenticationSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClientAuthenticationSettings if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ClientAuthenticationSettings. - */ - public static ClientAuthenticationSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClientAuthenticationSettings deserializedClientAuthenticationSettings = new ClientAuthenticationSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("alternativeAuthenticationNameSources".equals(fieldName)) { - List alternativeAuthenticationNameSources = reader - .readArray(reader1 -> AlternativeAuthenticationNameSource.fromString(reader1.getString())); - deserializedClientAuthenticationSettings.alternativeAuthenticationNameSources - = alternativeAuthenticationNameSources; - } else if ("customJwtAuthentication".equals(fieldName)) { - deserializedClientAuthenticationSettings.customJwtAuthentication - = CustomJwtAuthenticationSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedClientAuthenticationSettings; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroup.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroup.java index 19f6c9c5303d..3b0cbe403b83 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroup.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroup.java @@ -34,7 +34,7 @@ public interface ClientGroup { String type(); /** - * Gets the systemData property: The system metadata relating to the ClientGroup resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationManagedIdentity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationManagedIdentity.java deleted file mode 100644 index 581b680b897f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationManagedIdentity.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The identity information for retrieving the certificate for custom JWT authentication. - */ -@Fluent -public final class CustomJwtAuthenticationManagedIdentity - implements JsonSerializable { - /* - * The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. - */ - private CustomJwtAuthenticationManagedIdentityType type; - - /* - * The user identity associated with the resource. - */ - private String userAssignedIdentity; - - /** - * Creates an instance of CustomJwtAuthenticationManagedIdentity class. - */ - public CustomJwtAuthenticationManagedIdentity() { - } - - /** - * Get the type property: The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. - * - * @return the type value. - */ - public CustomJwtAuthenticationManagedIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. - * - * @param type the type value to set. - * @return the CustomJwtAuthenticationManagedIdentity object itself. - */ - public CustomJwtAuthenticationManagedIdentity withType(CustomJwtAuthenticationManagedIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentity property: The user identity associated with the resource. - * - * @return the userAssignedIdentity value. - */ - public String userAssignedIdentity() { - return this.userAssignedIdentity; - } - - /** - * Set the userAssignedIdentity property: The user identity associated with the resource. - * - * @param userAssignedIdentity the userAssignedIdentity value to set. - * @return the CustomJwtAuthenticationManagedIdentity object itself. - */ - public CustomJwtAuthenticationManagedIdentity withUserAssignedIdentity(String userAssignedIdentity) { - this.userAssignedIdentity = userAssignedIdentity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property type in model CustomJwtAuthenticationManagedIdentity")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomJwtAuthenticationManagedIdentity.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomJwtAuthenticationManagedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomJwtAuthenticationManagedIdentity if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CustomJwtAuthenticationManagedIdentity. - */ - public static CustomJwtAuthenticationManagedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomJwtAuthenticationManagedIdentity deserializedCustomJwtAuthenticationManagedIdentity - = new CustomJwtAuthenticationManagedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedCustomJwtAuthenticationManagedIdentity.type - = CustomJwtAuthenticationManagedIdentityType.fromString(reader.getString()); - } else if ("userAssignedIdentity".equals(fieldName)) { - deserializedCustomJwtAuthenticationManagedIdentity.userAssignedIdentity = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomJwtAuthenticationManagedIdentity; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationManagedIdentityType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationManagedIdentityType.java deleted file mode 100644 index 5e26e33f9cb5..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationManagedIdentityType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. - */ -public final class CustomJwtAuthenticationManagedIdentityType - extends ExpandableStringEnum { - /** - * Static value SystemAssigned for CustomJwtAuthenticationManagedIdentityType. - */ - public static final CustomJwtAuthenticationManagedIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * Static value UserAssigned for CustomJwtAuthenticationManagedIdentityType. - */ - public static final CustomJwtAuthenticationManagedIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * Creates a new instance of CustomJwtAuthenticationManagedIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CustomJwtAuthenticationManagedIdentityType() { - } - - /** - * Creates or finds a CustomJwtAuthenticationManagedIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CustomJwtAuthenticationManagedIdentityType. - */ - public static CustomJwtAuthenticationManagedIdentityType fromString(String name) { - return fromString(name, CustomJwtAuthenticationManagedIdentityType.class); - } - - /** - * Gets known CustomJwtAuthenticationManagedIdentityType values. - * - * @return known CustomJwtAuthenticationManagedIdentityType values. - */ - public static Collection values() { - return values(CustomJwtAuthenticationManagedIdentityType.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationSettings.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationSettings.java deleted file mode 100644 index 5295f39a13ea..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationSettings.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Custom JWT authentication settings for namespace resource. - */ -@Fluent -public final class CustomJwtAuthenticationSettings implements JsonSerializable { - /* - * Expected JWT token issuer. - */ - private String tokenIssuer; - - /* - * Information about the certificate that is used for token validation. We currently support maximum 2 certificates. - */ - private List issuerCertificates; - - /** - * Creates an instance of CustomJwtAuthenticationSettings class. - */ - public CustomJwtAuthenticationSettings() { - } - - /** - * Get the tokenIssuer property: Expected JWT token issuer. - * - * @return the tokenIssuer value. - */ - public String tokenIssuer() { - return this.tokenIssuer; - } - - /** - * Set the tokenIssuer property: Expected JWT token issuer. - * - * @param tokenIssuer the tokenIssuer value to set. - * @return the CustomJwtAuthenticationSettings object itself. - */ - public CustomJwtAuthenticationSettings withTokenIssuer(String tokenIssuer) { - this.tokenIssuer = tokenIssuer; - return this; - } - - /** - * Get the issuerCertificates property: Information about the certificate that is used for token validation. We - * currently support maximum 2 certificates. - * - * @return the issuerCertificates value. - */ - public List issuerCertificates() { - return this.issuerCertificates; - } - - /** - * Set the issuerCertificates property: Information about the certificate that is used for token validation. We - * currently support maximum 2 certificates. - * - * @param issuerCertificates the issuerCertificates value to set. - * @return the CustomJwtAuthenticationSettings object itself. - */ - public CustomJwtAuthenticationSettings withIssuerCertificates(List issuerCertificates) { - this.issuerCertificates = issuerCertificates; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (issuerCertificates() != null) { - issuerCertificates().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tokenIssuer", this.tokenIssuer); - jsonWriter.writeArrayField("issuerCertificates", this.issuerCertificates, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomJwtAuthenticationSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomJwtAuthenticationSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CustomJwtAuthenticationSettings. - */ - public static CustomJwtAuthenticationSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomJwtAuthenticationSettings deserializedCustomJwtAuthenticationSettings - = new CustomJwtAuthenticationSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tokenIssuer".equals(fieldName)) { - deserializedCustomJwtAuthenticationSettings.tokenIssuer = reader.getString(); - } else if ("issuerCertificates".equals(fieldName)) { - List issuerCertificates - = reader.readArray(reader1 -> IssuerCertificateInfo.fromJson(reader1)); - deserializedCustomJwtAuthenticationSettings.issuerCertificates = issuerCertificates; - } else { - reader.skipChildren(); - } - } - - return deserializedCustomJwtAuthenticationSettings; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domain.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domain.java index 480236eb5e48..34c2f2f6b39b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domain.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domain.java @@ -51,13 +51,6 @@ public interface Domain { */ Map tags(); - /** - * Gets the sku property: The Sku pricing tier for the Event Grid Domain resource. - * - * @return the sku value. - */ - ResourceSku sku(); - /** * Gets the identity property: Identity information for the Event Grid Domain resource. * @@ -66,7 +59,7 @@ public interface Domain { IdentityInfo identity(); /** - * Gets the systemData property: The system metadata relating to the Event Grid Domain resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -288,7 +281,7 @@ interface WithResourceGroup { * The stage of the Domain definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku, DefinitionStages.WithIdentity, + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithMinimumTlsVersionAllowed, DefinitionStages.WithInputSchema, DefinitionStages.WithEventTypeInfo, DefinitionStages.WithInputSchemaMapping, DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithInboundIpRules, @@ -323,19 +316,6 @@ interface WithTags { WithCreate withTags(Map tags); } - /** - * The stage of the Domain definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: The Sku pricing tier for the Event Grid Domain resource.. - * - * @param sku The Sku pricing tier for the Event Grid Domain resource. - * @return the next definition stage. - */ - WithCreate withSku(ResourceSku sku); - } - /** * The stage of the Domain definition allowing to specify identity. */ @@ -559,9 +539,8 @@ interface WithDataResidencyBoundary { /** * The template for Domain update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, - UpdateStages.WithPublicNetworkAccess, UpdateStages.WithInboundIpRules, - UpdateStages.WithMinimumTlsVersionAllowed, UpdateStages.WithDisableLocalAuth, + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithPublicNetworkAccess, + UpdateStages.WithInboundIpRules, UpdateStages.WithMinimumTlsVersionAllowed, UpdateStages.WithDisableLocalAuth, UpdateStages.WithAutoCreateTopicWithFirstSubscription, UpdateStages.WithAutoDeleteTopicWithLastSubscription, UpdateStages.WithDataResidencyBoundary, UpdateStages.WithEventTypeInfo { /** @@ -610,19 +589,6 @@ interface WithIdentity { Update withIdentity(IdentityInfo identity); } - /** - * The stage of the Domain update allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: The Sku pricing tier for the domain.. - * - * @param sku The Sku pricing tier for the domain. - * @return the next definition stage. - */ - Update withSku(ResourceSku sku); - } - /** * The stage of the Domain update allowing to specify publicNetworkAccess. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopic.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopic.java index 2ba7762e4640..50e7ebc646be 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopic.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopic.java @@ -33,7 +33,7 @@ public interface DomainTopic { String type(); /** - * Gets the systemData property: The system metadata relating to Domain Topic resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicEventSubscriptions.java index 0ed5b039060f..756a77bc5b54 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicEventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicEventSubscriptions.java @@ -13,41 +13,6 @@ * Resource collection API of DomainTopicEventSubscriptions. */ public interface DomainTopicEventSubscriptions { - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. - */ - Response getDeliveryAttributesWithResponse(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic. - */ - DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName); - /** * Get a nested event subscription for domain topic. * @@ -264,4 +229,39 @@ EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String domainName, */ PagedIterable list(String resourceGroupName, String domainName, String topicName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. + */ + Response getDeliveryAttributesWithResponse(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription for domain topic. + */ + DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainUpdateParameters.java index 67f4a66df4ef..f50dcc7b290e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainUpdateParameters.java @@ -34,11 +34,6 @@ public final class DomainUpdateParameters implements JsonSerializable writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -416,8 +387,6 @@ public static DomainUpdateParameters fromJson(JsonReader jsonReader) throws IOEx = DomainUpdateParameterProperties.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedDomainUpdateParameters.identity = IdentityInfo.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedDomainUpdateParameters.sku = ResourceSku.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EndpointType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EndpointType.java index 8bcfdbb9a90a..9af7d330e2ce 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EndpointType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EndpointType.java @@ -46,11 +46,6 @@ public final class EndpointType extends ExpandableStringEnum { */ public static final EndpointType AZURE_FUNCTION = fromString("AzureFunction"); - /** - * Static value PartnerDestination for EndpointType. - */ - public static final EndpointType PARTNER_DESTINATION = fromString("PartnerDestination"); - /** * Static value MonitorAlert for EndpointType. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscription.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscription.java index 228641b98e18..7afbc4d8dbcf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscription.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscription.java @@ -37,7 +37,7 @@ public interface EventSubscription { String type(); /** - * Gets the systemData property: The system metadata relating to Event Subscription resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionDestination.java index e97db3a5fea1..e8ec3caabc40 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionDestination.java @@ -92,8 +92,6 @@ public static EventSubscriptionDestination fromJson(JsonReader jsonReader) throw return ServiceBusTopicEventSubscriptionDestination.fromJson(readerToUse.reset()); } else if ("AzureFunction".equals(discriminatorValue)) { return AzureFunctionEventSubscriptionDestination.fromJson(readerToUse.reset()); - } else if ("PartnerDestination".equals(discriminatorValue)) { - return PartnerEventSubscriptionDestination.fromJson(readerToUse.reset()); } else if ("MonitorAlert".equals(discriminatorValue)) { return MonitorAlertEventSubscriptionDestination.fromJson(readerToUse.reset()); } else if ("NamespaceTopic".equals(discriminatorValue)) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java index 37244be344ad..5ee29f998424 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java @@ -13,50 +13,6 @@ * Resource collection API of EventSubscriptions. */ public interface EventSubscriptions { - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. - */ - Response getDeliveryAttributesWithResponse(String scope, String eventSubscriptionName, - Context context); - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. - */ - DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName); - /** * Get an event subscription. * @@ -653,4 +609,48 @@ PagedIterable listByResource(String resourceGroupName, String */ PagedIterable listByDomainTopic(String resourceGroupName, String domainName, String topicName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription along with {@link Response}. + */ + Response getDeliveryAttributesWithResponse(String scope, String eventSubscriptionName, + Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription. + */ + DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventType.java index bb1ceeb24d6c..436a512d0afa 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventType.java @@ -46,7 +46,7 @@ public interface EventType { String description(); /** - * Gets the schemaUrl property: Url of the schema for this event type. + * Gets the schemaUrl property: URL of the schema for this event type. * * @return the schemaUrl value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtendedLocation.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtendedLocation.java deleted file mode 100644 index 2b261ce176b9..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtendedLocation.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Definition of an Extended Location. - */ -@Fluent -public final class ExtendedLocation implements JsonSerializable { - /* - * Fully qualified name of the extended location. - */ - private String name; - - /* - * Type of the extended location. - */ - private String type; - - /** - * Creates an instance of ExtendedLocation class. - */ - public ExtendedLocation() { - } - - /** - * Get the name property: Fully qualified name of the extended location. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Fully qualified name of the extended location. - * - * @param name the name value to set. - * @return the ExtendedLocation object itself. - */ - public ExtendedLocation withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: Type of the extended location. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Type of the extended location. - * - * @param type the type value to set. - * @return the ExtendedLocation object itself. - */ - public ExtendedLocation withType(String type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExtendedLocation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExtendedLocation if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ExtendedLocation. - */ - public static ExtendedLocation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExtendedLocation deserializedExtendedLocation = new ExtendedLocation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedExtendedLocation.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedExtendedLocation.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExtendedLocation; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopic.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopic.java index 8912614920df..2fc22b1930bb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopic.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopic.java @@ -33,7 +33,7 @@ public interface ExtensionTopic { String type(); /** - * Gets the systemData property: The system metadata relating to Extension Topic resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Filter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Filter.java index e23fe9aebb65..fda341f5b085 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Filter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Filter.java @@ -14,8 +14,7 @@ /** * This is the base type that represents a filter. To configure a filter, do not directly instantiate an object of this * class. Instead, instantiate - * an object of a derived class such as BoolEqualsFilter, NumberInFilter, StringEqualsFilter etc depending on the type - * of the key based on + * an object of a derived class such as BoolEqualsFilter, NumberInFilter etc depending on the type of the key based on * which you want to filter. */ @Fluent diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IssuerCertificateInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IssuerCertificateInfo.java deleted file mode 100644 index e6733175a04b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IssuerCertificateInfo.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Information about the certificate that is used for token validation. - */ -@Fluent -public final class IssuerCertificateInfo implements JsonSerializable { - /* - * Keyvault certificate URL in https://keyvaultname.vault.azure.net/certificates/certificateName/certificateVersion - * format. - */ - private String certificateUrl; - - /* - * The identity that will be used to access the certificate. - */ - private CustomJwtAuthenticationManagedIdentity identity; - - /** - * Creates an instance of IssuerCertificateInfo class. - */ - public IssuerCertificateInfo() { - } - - /** - * Get the certificateUrl property: Keyvault certificate URL in - * https://keyvaultname.vault.azure.net/certificates/certificateName/certificateVersion format. - * - * @return the certificateUrl value. - */ - public String certificateUrl() { - return this.certificateUrl; - } - - /** - * Set the certificateUrl property: Keyvault certificate URL in - * https://keyvaultname.vault.azure.net/certificates/certificateName/certificateVersion format. - * - * @param certificateUrl the certificateUrl value to set. - * @return the IssuerCertificateInfo object itself. - */ - public IssuerCertificateInfo withCertificateUrl(String certificateUrl) { - this.certificateUrl = certificateUrl; - return this; - } - - /** - * Get the identity property: The identity that will be used to access the certificate. - * - * @return the identity value. - */ - public CustomJwtAuthenticationManagedIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity that will be used to access the certificate. - * - * @param identity the identity value to set. - * @return the IssuerCertificateInfo object itself. - */ - public IssuerCertificateInfo withIdentity(CustomJwtAuthenticationManagedIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (certificateUrl() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property certificateUrl in model IssuerCertificateInfo")); - } - if (identity() != null) { - identity().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IssuerCertificateInfo.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("certificateUrl", this.certificateUrl); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IssuerCertificateInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IssuerCertificateInfo if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IssuerCertificateInfo. - */ - public static IssuerCertificateInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IssuerCertificateInfo deserializedIssuerCertificateInfo = new IssuerCertificateInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("certificateUrl".equals(fieldName)) { - deserializedIssuerCertificateInfo.certificateUrl = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedIssuerCertificateInfo.identity - = CustomJwtAuthenticationManagedIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIssuerCertificateInfo; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespace.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespace.java index 997d326ec6bb..15f3353a4284 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespace.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespace.java @@ -67,7 +67,7 @@ public interface Namespace { IdentityInfo identity(); /** - * Gets the systemData property: The system metadata relating to the namespace resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopic.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopic.java index 3dac4ca32d3b..dec28d601ac4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopic.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopic.java @@ -35,7 +35,7 @@ public interface NamespaceTopic { String type(); /** - * Gets the systemData property: The system metadata relating to namespace topic resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterAssociationAccessMode.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterAssociationAccessMode.java deleted file mode 100644 index 5c3ff202f211..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterAssociationAccessMode.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Network security perimeter access mode. - */ -public final class NetworkSecurityPerimeterAssociationAccessMode - extends ExpandableStringEnum { - /** - * Static value Learning for NetworkSecurityPerimeterAssociationAccessMode. - */ - public static final NetworkSecurityPerimeterAssociationAccessMode LEARNING = fromString("Learning"); - - /** - * Static value Enforced for NetworkSecurityPerimeterAssociationAccessMode. - */ - public static final NetworkSecurityPerimeterAssociationAccessMode ENFORCED = fromString("Enforced"); - - /** - * Static value Audit for NetworkSecurityPerimeterAssociationAccessMode. - */ - public static final NetworkSecurityPerimeterAssociationAccessMode AUDIT = fromString("Audit"); - - /** - * Creates a new instance of NetworkSecurityPerimeterAssociationAccessMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkSecurityPerimeterAssociationAccessMode() { - } - - /** - * Creates or finds a NetworkSecurityPerimeterAssociationAccessMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkSecurityPerimeterAssociationAccessMode. - */ - public static NetworkSecurityPerimeterAssociationAccessMode fromString(String name) { - return fromString(name, NetworkSecurityPerimeterAssociationAccessMode.class); - } - - /** - * Gets known NetworkSecurityPerimeterAssociationAccessMode values. - * - * @return known NetworkSecurityPerimeterAssociationAccessMode values. - */ - public static Collection values() { - return values(NetworkSecurityPerimeterAssociationAccessMode.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigProvisioningState.java deleted file mode 100644 index f7e337d512d4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigProvisioningState.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state to reflect configuration state and indicate status of nsp profile configuration retrieval. - */ -public final class NetworkSecurityPerimeterConfigProvisioningState - extends ExpandableStringEnum { - /** - * Static value Creating for NetworkSecurityPerimeterConfigProvisioningState. - */ - public static final NetworkSecurityPerimeterConfigProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Updating for NetworkSecurityPerimeterConfigProvisioningState. - */ - public static final NetworkSecurityPerimeterConfigProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for NetworkSecurityPerimeterConfigProvisioningState. - */ - public static final NetworkSecurityPerimeterConfigProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Succeeded for NetworkSecurityPerimeterConfigProvisioningState. - */ - public static final NetworkSecurityPerimeterConfigProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Canceled for NetworkSecurityPerimeterConfigProvisioningState. - */ - public static final NetworkSecurityPerimeterConfigProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Failed for NetworkSecurityPerimeterConfigProvisioningState. - */ - public static final NetworkSecurityPerimeterConfigProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Deleted for NetworkSecurityPerimeterConfigProvisioningState. - */ - public static final NetworkSecurityPerimeterConfigProvisioningState DELETED = fromString("Deleted"); - - /** - * Static value Accepted for NetworkSecurityPerimeterConfigProvisioningState. - */ - public static final NetworkSecurityPerimeterConfigProvisioningState ACCEPTED = fromString("Accepted"); - - /** - * Creates a new instance of NetworkSecurityPerimeterConfigProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkSecurityPerimeterConfigProvisioningState() { - } - - /** - * Creates or finds a NetworkSecurityPerimeterConfigProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkSecurityPerimeterConfigProvisioningState. - */ - public static NetworkSecurityPerimeterConfigProvisioningState fromString(String name) { - return fromString(name, NetworkSecurityPerimeterConfigProvisioningState.class); - } - - /** - * Gets known NetworkSecurityPerimeterConfigProvisioningState values. - * - * @return known NetworkSecurityPerimeterConfigProvisioningState values. - */ - public static Collection values() { - return values(NetworkSecurityPerimeterConfigProvisioningState.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfiguration.java deleted file mode 100644 index a9456afebfd9..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfiguration.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import java.util.List; - -/** - * An immutable client-side representation of NetworkSecurityPerimeterConfiguration. - */ -public interface NetworkSecurityPerimeterConfiguration { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the provisioningState property: Provisioning state to reflect configuration state and indicate status of nsp - * profile configuration retrieval. - * - * @return the provisioningState value. - */ - NetworkSecurityPerimeterConfigProvisioningState provisioningState(); - - /** - * Gets the provisioningIssues property: Provisioning issues to reflect status when attempting to retrieve nsp - * profile configuration. - * - * @return the provisioningIssues value. - */ - List provisioningIssues(); - - /** - * Gets the networkSecurityPerimeter property: Perimeter info for nsp association. - * - * @return the networkSecurityPerimeter value. - */ - NetworkSecurityPerimeterInfo networkSecurityPerimeter(); - - /** - * Gets the resourceAssociation property: Nsp association name and access mode of association. - * - * @return the resourceAssociation value. - */ - ResourceAssociation resourceAssociation(); - - /** - * Gets the profile property: Nsp profile configuration, access rules and diagnostic settings. - * - * @return the profile value. - */ - NetworkSecurityPerimeterConfigurationProfile profile(); - - /** - * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner - * object. - * - * @return the inner object. - */ - NetworkSecurityPerimeterConfigurationInner innerModel(); -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssueSeverity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssueSeverity.java deleted file mode 100644 index 11c64d814fcf..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssueSeverity.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning issue severity. - */ -public final class NetworkSecurityPerimeterConfigurationIssueSeverity - extends ExpandableStringEnum { - /** - * Static value Warning for NetworkSecurityPerimeterConfigurationIssueSeverity. - */ - public static final NetworkSecurityPerimeterConfigurationIssueSeverity WARNING = fromString("Warning"); - - /** - * Static value Error for NetworkSecurityPerimeterConfigurationIssueSeverity. - */ - public static final NetworkSecurityPerimeterConfigurationIssueSeverity ERROR = fromString("Error"); - - /** - * Creates a new instance of NetworkSecurityPerimeterConfigurationIssueSeverity value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkSecurityPerimeterConfigurationIssueSeverity() { - } - - /** - * Creates or finds a NetworkSecurityPerimeterConfigurationIssueSeverity from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkSecurityPerimeterConfigurationIssueSeverity. - */ - public static NetworkSecurityPerimeterConfigurationIssueSeverity fromString(String name) { - return fromString(name, NetworkSecurityPerimeterConfigurationIssueSeverity.class); - } - - /** - * Gets known NetworkSecurityPerimeterConfigurationIssueSeverity values. - * - * @return known NetworkSecurityPerimeterConfigurationIssueSeverity values. - */ - public static Collection values() { - return values(NetworkSecurityPerimeterConfigurationIssueSeverity.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssueType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssueType.java deleted file mode 100644 index 69d011ccc696..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssueType.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning issue type. - */ -public final class NetworkSecurityPerimeterConfigurationIssueType - extends ExpandableStringEnum { - /** - * Static value MissingPerimeterConfiguration for NetworkSecurityPerimeterConfigurationIssueType. - */ - public static final NetworkSecurityPerimeterConfigurationIssueType MISSING_PERIMETER_CONFIGURATION - = fromString("MissingPerimeterConfiguration"); - - /** - * Static value MissingIdentityConfiguration for NetworkSecurityPerimeterConfigurationIssueType. - */ - public static final NetworkSecurityPerimeterConfigurationIssueType MISSING_IDENTITY_CONFIGURATION - = fromString("MissingIdentityConfiguration"); - - /** - * Static value ConfigurationPropagationFailure for NetworkSecurityPerimeterConfigurationIssueType. - */ - public static final NetworkSecurityPerimeterConfigurationIssueType CONFIGURATION_PROPAGATION_FAILURE - = fromString("ConfigurationPropagationFailure"); - - /** - * Static value Other for NetworkSecurityPerimeterConfigurationIssueType. - */ - public static final NetworkSecurityPerimeterConfigurationIssueType OTHER = fromString("Other"); - - /** - * Creates a new instance of NetworkSecurityPerimeterConfigurationIssueType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkSecurityPerimeterConfigurationIssueType() { - } - - /** - * Creates or finds a NetworkSecurityPerimeterConfigurationIssueType from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkSecurityPerimeterConfigurationIssueType. - */ - public static NetworkSecurityPerimeterConfigurationIssueType fromString(String name) { - return fromString(name, NetworkSecurityPerimeterConfigurationIssueType.class); - } - - /** - * Gets known NetworkSecurityPerimeterConfigurationIssueType values. - * - * @return known NetworkSecurityPerimeterConfigurationIssueType values. - */ - public static Collection values() { - return values(NetworkSecurityPerimeterConfigurationIssueType.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssues.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssues.java deleted file mode 100644 index 1e68f92a704e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssues.java +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationIssuesProperties; -import java.io.IOException; -import java.util.List; - -/** - * Network security perimeter configuration issues. - */ -@Fluent -public final class NetworkSecurityPerimeterConfigurationIssues - implements JsonSerializable { - /* - * Provisioning issue name. - */ - private String name; - - /* - * Provisioning issue properties. - */ - private NetworkSecurityPerimeterConfigurationIssuesProperties innerProperties; - - /** - * Creates an instance of NetworkSecurityPerimeterConfigurationIssues class. - */ - public NetworkSecurityPerimeterConfigurationIssues() { - } - - /** - * Get the name property: Provisioning issue name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Provisioning issue name. - * - * @param name the name value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues withName(String name) { - this.name = name; - return this; - } - - /** - * Get the innerProperties property: Provisioning issue properties. - * - * @return the innerProperties value. - */ - private NetworkSecurityPerimeterConfigurationIssuesProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the issueType property: Provisioning issue type. - * - * @return the issueType value. - */ - public NetworkSecurityPerimeterConfigurationIssueType issueType() { - return this.innerProperties() == null ? null : this.innerProperties().issueType(); - } - - /** - * Set the issueType property: Provisioning issue type. - * - * @param issueType the issueType value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues - withIssueType(NetworkSecurityPerimeterConfigurationIssueType issueType) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationIssuesProperties(); - } - this.innerProperties().withIssueType(issueType); - return this; - } - - /** - * Get the severity property: Provisioning issue severity. - * - * @return the severity value. - */ - public NetworkSecurityPerimeterConfigurationIssueSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: Provisioning issue severity. - * - * @param severity the severity value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues - withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationIssuesProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the description property: Provisioning issue description. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: Provisioning issue description. - * - * @param description the description value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationIssuesProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the suggestedResourceIds property: ARM IDs of resources that can be associated to the same perimeter to - * remediate the issue. - * - * @return the suggestedResourceIds value. - */ - public List suggestedResourceIds() { - return this.innerProperties() == null ? null : this.innerProperties().suggestedResourceIds(); - } - - /** - * Set the suggestedResourceIds property: ARM IDs of resources that can be associated to the same perimeter to - * remediate the issue. - * - * @param suggestedResourceIds the suggestedResourceIds value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues withSuggestedResourceIds(List suggestedResourceIds) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationIssuesProperties(); - } - this.innerProperties().withSuggestedResourceIds(suggestedResourceIds); - return this; - } - - /** - * Get the suggestedAccessRules property: Access rules that can be added to the same profile to remediate the issue. - * - * @return the suggestedAccessRules value. - */ - public List suggestedAccessRules() { - return this.innerProperties() == null ? null : this.innerProperties().suggestedAccessRules(); - } - - /** - * Set the suggestedAccessRules property: Access rules that can be added to the same profile to remediate the issue. - * - * @param suggestedAccessRules the suggestedAccessRules value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues withSuggestedAccessRules(List suggestedAccessRules) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationIssuesProperties(); - } - this.innerProperties().withSuggestedAccessRules(suggestedAccessRules); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterConfigurationIssues from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterConfigurationIssues if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterConfigurationIssues. - */ - public static NetworkSecurityPerimeterConfigurationIssues fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterConfigurationIssues deserializedNetworkSecurityPerimeterConfigurationIssues - = new NetworkSecurityPerimeterConfigurationIssues(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationIssues.name = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationIssues.innerProperties - = NetworkSecurityPerimeterConfigurationIssuesProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterConfigurationIssues; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationList.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationList.java deleted file mode 100644 index a5da4ee091f1..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationList.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import java.io.IOException; -import java.util.List; - -/** - * Network security perimeter configuration List. - */ -@Fluent -public final class NetworkSecurityPerimeterConfigurationList - implements JsonSerializable { - /* - * List of all network security parameter configurations. - */ - private List value; - - /* - * A link for the next page of Network Security Perimeter Configuration. - */ - private String nextLink; - - /** - * Creates an instance of NetworkSecurityPerimeterConfigurationList class. - */ - public NetworkSecurityPerimeterConfigurationList() { - } - - /** - * Get the value property: List of all network security parameter configurations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of all network security parameter configurations. - * - * @param value the value value to set. - * @return the NetworkSecurityPerimeterConfigurationList object itself. - */ - public NetworkSecurityPerimeterConfigurationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of Network Security Perimeter Configuration. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A link for the next page of Network Security Perimeter Configuration. - * - * @param nextLink the nextLink value to set. - * @return the NetworkSecurityPerimeterConfigurationList object itself. - */ - public NetworkSecurityPerimeterConfigurationList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterConfigurationList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterConfigurationList if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterConfigurationList. - */ - public static NetworkSecurityPerimeterConfigurationList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterConfigurationList deserializedNetworkSecurityPerimeterConfigurationList - = new NetworkSecurityPerimeterConfigurationList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> NetworkSecurityPerimeterConfigurationInner.fromJson(reader1)); - deserializedNetworkSecurityPerimeterConfigurationList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterConfigurationList; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationProfile.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationProfile.java deleted file mode 100644 index dbc4f2bdcc59..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationProfile.java +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Nsp configuration with profile information. - */ -@Fluent -public final class NetworkSecurityPerimeterConfigurationProfile - implements JsonSerializable { - /* - * Nsp configuration profile name. - */ - private String name; - - /* - * Access rules version number for nsp profile. - */ - private String accessRulesVersion; - - /* - * List of inbound or outbound access rule setup on the nsp profile. - */ - private List accessRules; - - /* - * Diagnostic settings version number for nsp profile. - */ - private String diagnosticSettingsVersion; - - /* - * Enabled log categories for nsp profile. - */ - private List enabledLogCategories; - - /** - * Creates an instance of NetworkSecurityPerimeterConfigurationProfile class. - */ - public NetworkSecurityPerimeterConfigurationProfile() { - } - - /** - * Get the name property: Nsp configuration profile name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Nsp configuration profile name. - * - * @param name the name value to set. - * @return the NetworkSecurityPerimeterConfigurationProfile object itself. - */ - public NetworkSecurityPerimeterConfigurationProfile withName(String name) { - this.name = name; - return this; - } - - /** - * Get the accessRulesVersion property: Access rules version number for nsp profile. - * - * @return the accessRulesVersion value. - */ - public String accessRulesVersion() { - return this.accessRulesVersion; - } - - /** - * Set the accessRulesVersion property: Access rules version number for nsp profile. - * - * @param accessRulesVersion the accessRulesVersion value to set. - * @return the NetworkSecurityPerimeterConfigurationProfile object itself. - */ - public NetworkSecurityPerimeterConfigurationProfile withAccessRulesVersion(String accessRulesVersion) { - this.accessRulesVersion = accessRulesVersion; - return this; - } - - /** - * Get the accessRules property: List of inbound or outbound access rule setup on the nsp profile. - * - * @return the accessRules value. - */ - public List accessRules() { - return this.accessRules; - } - - /** - * Set the accessRules property: List of inbound or outbound access rule setup on the nsp profile. - * - * @param accessRules the accessRules value to set. - * @return the NetworkSecurityPerimeterConfigurationProfile object itself. - */ - public NetworkSecurityPerimeterConfigurationProfile - withAccessRules(List accessRules) { - this.accessRules = accessRules; - return this; - } - - /** - * Get the diagnosticSettingsVersion property: Diagnostic settings version number for nsp profile. - * - * @return the diagnosticSettingsVersion value. - */ - public String diagnosticSettingsVersion() { - return this.diagnosticSettingsVersion; - } - - /** - * Set the diagnosticSettingsVersion property: Diagnostic settings version number for nsp profile. - * - * @param diagnosticSettingsVersion the diagnosticSettingsVersion value to set. - * @return the NetworkSecurityPerimeterConfigurationProfile object itself. - */ - public NetworkSecurityPerimeterConfigurationProfile - withDiagnosticSettingsVersion(String diagnosticSettingsVersion) { - this.diagnosticSettingsVersion = diagnosticSettingsVersion; - return this; - } - - /** - * Get the enabledLogCategories property: Enabled log categories for nsp profile. - * - * @return the enabledLogCategories value. - */ - public List enabledLogCategories() { - return this.enabledLogCategories; - } - - /** - * Set the enabledLogCategories property: Enabled log categories for nsp profile. - * - * @param enabledLogCategories the enabledLogCategories value to set. - * @return the NetworkSecurityPerimeterConfigurationProfile object itself. - */ - public NetworkSecurityPerimeterConfigurationProfile withEnabledLogCategories(List enabledLogCategories) { - this.enabledLogCategories = enabledLogCategories; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (accessRules() != null) { - accessRules().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("accessRulesVersion", this.accessRulesVersion); - jsonWriter.writeArrayField("accessRules", this.accessRules, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("diagnosticSettingsVersion", this.diagnosticSettingsVersion); - jsonWriter.writeArrayField("enabledLogCategories", this.enabledLogCategories, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterConfigurationProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterConfigurationProfile if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterConfigurationProfile. - */ - public static NetworkSecurityPerimeterConfigurationProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterConfigurationProfile deserializedNetworkSecurityPerimeterConfigurationProfile - = new NetworkSecurityPerimeterConfigurationProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationProfile.name = reader.getString(); - } else if ("accessRulesVersion".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationProfile.accessRulesVersion = reader.getString(); - } else if ("accessRules".equals(fieldName)) { - List accessRules - = reader.readArray(reader1 -> NetworkSecurityPerimeterProfileAccessRule.fromJson(reader1)); - deserializedNetworkSecurityPerimeterConfigurationProfile.accessRules = accessRules; - } else if ("diagnosticSettingsVersion".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationProfile.diagnosticSettingsVersion - = reader.getString(); - } else if ("enabledLogCategories".equals(fieldName)) { - List enabledLogCategories = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkSecurityPerimeterConfigurationProfile.enabledLogCategories - = enabledLogCategories; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterConfigurationProfile; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurations.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurations.java deleted file mode 100644 index a01e5c878368..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurations.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of NetworkSecurityPerimeterConfigurations. - */ -public interface NetworkSecurityPerimeterConfigurations { - /** - * Get a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName, Context context); - - /** - * Get a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain. - */ - NetworkSecurityPerimeterConfiguration get(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName); - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration. - */ - NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName); - - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration. - */ - NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, - String associationName, Context context); - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName); - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context); -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterInfo.java deleted file mode 100644 index 41fad643253f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterInfo.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network security perimeter info. - */ -@Fluent -public final class NetworkSecurityPerimeterInfo implements JsonSerializable { - /* - * Arm id for network security perimeter. - */ - private String id; - - /* - * Network security perimeter guid. - */ - private String perimeterGuid; - - /* - * Network security perimeter location. - */ - private String location; - - /** - * Creates an instance of NetworkSecurityPerimeterInfo class. - */ - public NetworkSecurityPerimeterInfo() { - } - - /** - * Get the id property: Arm id for network security perimeter. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Arm id for network security perimeter. - * - * @param id the id value to set. - * @return the NetworkSecurityPerimeterInfo object itself. - */ - public NetworkSecurityPerimeterInfo withId(String id) { - this.id = id; - return this; - } - - /** - * Get the perimeterGuid property: Network security perimeter guid. - * - * @return the perimeterGuid value. - */ - public String perimeterGuid() { - return this.perimeterGuid; - } - - /** - * Set the perimeterGuid property: Network security perimeter guid. - * - * @param perimeterGuid the perimeterGuid value to set. - * @return the NetworkSecurityPerimeterInfo object itself. - */ - public NetworkSecurityPerimeterInfo withPerimeterGuid(String perimeterGuid) { - this.perimeterGuid = perimeterGuid; - return this; - } - - /** - * Get the location property: Network security perimeter location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Network security perimeter location. - * - * @param location the location value to set. - * @return the NetworkSecurityPerimeterInfo object itself. - */ - public NetworkSecurityPerimeterInfo withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("perimeterGuid", this.perimeterGuid); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterInfo if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterInfo. - */ - public static NetworkSecurityPerimeterInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterInfo deserializedNetworkSecurityPerimeterInfo = new NetworkSecurityPerimeterInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedNetworkSecurityPerimeterInfo.id = reader.getString(); - } else if ("perimeterGuid".equals(fieldName)) { - deserializedNetworkSecurityPerimeterInfo.perimeterGuid = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedNetworkSecurityPerimeterInfo.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterInfo; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterProfileAccessRule.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterProfileAccessRule.java deleted file mode 100644 index 22666729e5da..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterProfileAccessRule.java +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterProfileAccessRuleProperties; -import java.io.IOException; -import java.util.List; - -/** - * Network security perimeter profile access rule. - */ -@Fluent -public final class NetworkSecurityPerimeterProfileAccessRule - implements JsonSerializable { - /* - * Fully Qualified Arm id for network security perimeter profile access rule. - */ - private String fullyQualifiedArmId; - - /* - * Name for nsp access rule. - */ - private String name; - - /* - * nsp access rule type. - */ - private String type; - - /* - * NSP access rule properties. - */ - private NetworkSecurityPerimeterProfileAccessRuleProperties innerProperties; - - /** - * Creates an instance of NetworkSecurityPerimeterProfileAccessRule class. - */ - public NetworkSecurityPerimeterProfileAccessRule() { - } - - /** - * Get the fullyQualifiedArmId property: Fully Qualified Arm id for network security perimeter profile access rule. - * - * @return the fullyQualifiedArmId value. - */ - public String fullyQualifiedArmId() { - return this.fullyQualifiedArmId; - } - - /** - * Set the fullyQualifiedArmId property: Fully Qualified Arm id for network security perimeter profile access rule. - * - * @param fullyQualifiedArmId the fullyQualifiedArmId value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withFullyQualifiedArmId(String fullyQualifiedArmId) { - this.fullyQualifiedArmId = fullyQualifiedArmId; - return this; - } - - /** - * Get the name property: Name for nsp access rule. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name for nsp access rule. - * - * @param name the name value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: nsp access rule type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: nsp access rule type. - * - * @param type the type value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withType(String type) { - this.type = type; - return this; - } - - /** - * Get the innerProperties property: NSP access rule properties. - * - * @return the innerProperties value. - */ - private NetworkSecurityPerimeterProfileAccessRuleProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the direction property: NSP access rule direction. - * - * @return the direction value. - */ - public NetworkSecurityPerimeterProfileAccessRuleDirection direction() { - return this.innerProperties() == null ? null : this.innerProperties().direction(); - } - - /** - * Set the direction property: NSP access rule direction. - * - * @param direction the direction value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule - withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection direction) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withDirection(direction); - return this; - } - - /** - * Get the addressPrefixes property: Address prefixes. - * - * @return the addressPrefixes value. - */ - public List addressPrefixes() { - return this.innerProperties() == null ? null : this.innerProperties().addressPrefixes(); - } - - /** - * Set the addressPrefixes property: Address prefixes. - * - * @param addressPrefixes the addressPrefixes value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withAddressPrefixes(List addressPrefixes) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withAddressPrefixes(addressPrefixes); - return this; - } - - /** - * Get the subscriptions property: List of subscriptions. - * - * @return the subscriptions value. - */ - public List subscriptions() { - return this.innerProperties() == null ? null : this.innerProperties().subscriptions(); - } - - /** - * Set the subscriptions property: List of subscriptions. - * - * @param subscriptions the subscriptions value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule - withSubscriptions(List subscriptions) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withSubscriptions(subscriptions); - return this; - } - - /** - * Get the networkSecurityPerimeters property: Network security perimeters. - * - * @return the networkSecurityPerimeters value. - */ - public List networkSecurityPerimeters() { - return this.innerProperties() == null ? null : this.innerProperties().networkSecurityPerimeters(); - } - - /** - * Set the networkSecurityPerimeters property: Network security perimeters. - * - * @param networkSecurityPerimeters the networkSecurityPerimeters value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule - withNetworkSecurityPerimeters(List networkSecurityPerimeters) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withNetworkSecurityPerimeters(networkSecurityPerimeters); - return this; - } - - /** - * Get the fullyQualifiedDomainNames property: Fully qualified domain names. - * - * @return the fullyQualifiedDomainNames value. - */ - public List fullyQualifiedDomainNames() { - return this.innerProperties() == null ? null : this.innerProperties().fullyQualifiedDomainNames(); - } - - /** - * Set the fullyQualifiedDomainNames property: Fully qualified domain names. - * - * @param fullyQualifiedDomainNames the fullyQualifiedDomainNames value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule - withFullyQualifiedDomainNames(List fullyQualifiedDomainNames) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withFullyQualifiedDomainNames(fullyQualifiedDomainNames); - return this; - } - - /** - * Get the emailAddresses property: List of email addresses. - * - * @return the emailAddresses value. - */ - public List emailAddresses() { - return this.innerProperties() == null ? null : this.innerProperties().emailAddresses(); - } - - /** - * Set the emailAddresses property: List of email addresses. - * - * @param emailAddresses the emailAddresses value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withEmailAddresses(List emailAddresses) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withEmailAddresses(emailAddresses); - return this; - } - - /** - * Get the phoneNumbers property: List of phone numbers. - * - * @return the phoneNumbers value. - */ - public List phoneNumbers() { - return this.innerProperties() == null ? null : this.innerProperties().phoneNumbers(); - } - - /** - * Set the phoneNumbers property: List of phone numbers. - * - * @param phoneNumbers the phoneNumbers value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withPhoneNumbers(List phoneNumbers) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withPhoneNumbers(phoneNumbers); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fullyQualifiedArmId", this.fullyQualifiedArmId); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterProfileAccessRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterProfileAccessRule if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterProfileAccessRule. - */ - public static NetworkSecurityPerimeterProfileAccessRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterProfileAccessRule deserializedNetworkSecurityPerimeterProfileAccessRule - = new NetworkSecurityPerimeterProfileAccessRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fullyQualifiedArmId".equals(fieldName)) { - deserializedNetworkSecurityPerimeterProfileAccessRule.fullyQualifiedArmId = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedNetworkSecurityPerimeterProfileAccessRule.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedNetworkSecurityPerimeterProfileAccessRule.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNetworkSecurityPerimeterProfileAccessRule.innerProperties - = NetworkSecurityPerimeterProfileAccessRuleProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterProfileAccessRule; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterProfileAccessRuleDirection.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterProfileAccessRuleDirection.java deleted file mode 100644 index 5261b6371258..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterProfileAccessRuleDirection.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * NSP access rule direction. - */ -public final class NetworkSecurityPerimeterProfileAccessRuleDirection - extends ExpandableStringEnum { - /** - * Static value Inbound for NetworkSecurityPerimeterProfileAccessRuleDirection. - */ - public static final NetworkSecurityPerimeterProfileAccessRuleDirection INBOUND = fromString("Inbound"); - - /** - * Static value Outbound for NetworkSecurityPerimeterProfileAccessRuleDirection. - */ - public static final NetworkSecurityPerimeterProfileAccessRuleDirection OUTBOUND = fromString("Outbound"); - - /** - * Creates a new instance of NetworkSecurityPerimeterProfileAccessRuleDirection value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkSecurityPerimeterProfileAccessRuleDirection() { - } - - /** - * Creates or finds a NetworkSecurityPerimeterProfileAccessRuleDirection from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkSecurityPerimeterProfileAccessRuleDirection. - */ - public static NetworkSecurityPerimeterProfileAccessRuleDirection fromString(String name) { - return fromString(name, NetworkSecurityPerimeterProfileAccessRuleDirection.class); - } - - /** - * Gets known NetworkSecurityPerimeterProfileAccessRuleDirection values. - * - * @return known NetworkSecurityPerimeterProfileAccessRuleDirection values. - */ - public static Collection values() { - return values(NetworkSecurityPerimeterProfileAccessRuleDirection.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterResourceType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterResourceType.java deleted file mode 100644 index 0ea56f24cc47..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterResourceType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for NetworkSecurityPerimeterResourceType. - */ -public final class NetworkSecurityPerimeterResourceType - extends ExpandableStringEnum { - /** - * Static value topics for NetworkSecurityPerimeterResourceType. - */ - public static final NetworkSecurityPerimeterResourceType TOPICS = fromString("topics"); - - /** - * Static value domains for NetworkSecurityPerimeterResourceType. - */ - public static final NetworkSecurityPerimeterResourceType DOMAINS = fromString("domains"); - - /** - * Creates a new instance of NetworkSecurityPerimeterResourceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkSecurityPerimeterResourceType() { - } - - /** - * Creates or finds a NetworkSecurityPerimeterResourceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkSecurityPerimeterResourceType. - */ - public static NetworkSecurityPerimeterResourceType fromString(String name) { - return fromString(name, NetworkSecurityPerimeterResourceType.class); - } - - /** - * Gets known NetworkSecurityPerimeterResourceType values. - * - * @return known NetworkSecurityPerimeterResourceType values. - */ - public static Collection values() { - return values(NetworkSecurityPerimeterResourceType.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterSubscription.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterSubscription.java deleted file mode 100644 index e95dc426a10a..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterSubscription.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network security perimeter subscription inbound access rule. - */ -@Fluent -public final class NetworkSecurityPerimeterSubscription - implements JsonSerializable { - /* - * Subscription id. - */ - private String id; - - /** - * Creates an instance of NetworkSecurityPerimeterSubscription class. - */ - public NetworkSecurityPerimeterSubscription() { - } - - /** - * Get the id property: Subscription id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Subscription id. - * - * @param id the id value to set. - * @return the NetworkSecurityPerimeterSubscription object itself. - */ - public NetworkSecurityPerimeterSubscription withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterSubscription from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterSubscription if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterSubscription. - */ - public static NetworkSecurityPerimeterSubscription fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterSubscription deserializedNetworkSecurityPerimeterSubscription - = new NetworkSecurityPerimeterSubscription(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedNetworkSecurityPerimeterSubscription.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterSubscription; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthentication.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthentication.java deleted file mode 100644 index 97d9ba12c368..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthentication.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Partner client authentication. - */ -@Immutable -public class PartnerClientAuthentication implements JsonSerializable { - /* - * Type of client authentication - */ - private PartnerClientAuthenticationType clientAuthenticationType - = PartnerClientAuthenticationType.fromString("PartnerClientAuthentication"); - - /** - * Creates an instance of PartnerClientAuthentication class. - */ - public PartnerClientAuthentication() { - } - - /** - * Get the clientAuthenticationType property: Type of client authentication. - * - * @return the clientAuthenticationType value. - */ - public PartnerClientAuthenticationType clientAuthenticationType() { - return this.clientAuthenticationType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clientAuthenticationType", - this.clientAuthenticationType == null ? null : this.clientAuthenticationType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerClientAuthentication from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerClientAuthentication if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartnerClientAuthentication. - */ - public static PartnerClientAuthentication fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("clientAuthenticationType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureAD".equals(discriminatorValue)) { - return AzureADPartnerClientAuthentication.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static PartnerClientAuthentication fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerClientAuthentication deserializedPartnerClientAuthentication = new PartnerClientAuthentication(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clientAuthenticationType".equals(fieldName)) { - deserializedPartnerClientAuthentication.clientAuthenticationType - = PartnerClientAuthenticationType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerClientAuthentication; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthenticationType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthenticationType.java deleted file mode 100644 index 9357adc26664..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthenticationType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of client authentication. - */ -public final class PartnerClientAuthenticationType extends ExpandableStringEnum { - /** - * Static value AzureAD for PartnerClientAuthenticationType. - */ - public static final PartnerClientAuthenticationType AZURE_AD = fromString("AzureAD"); - - /** - * Creates a new instance of PartnerClientAuthenticationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PartnerClientAuthenticationType() { - } - - /** - * Creates or finds a PartnerClientAuthenticationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding PartnerClientAuthenticationType. - */ - public static PartnerClientAuthenticationType fromString(String name) { - return fromString(name, PartnerClientAuthenticationType.class); - } - - /** - * Gets known PartnerClientAuthenticationType values. - * - * @return known PartnerClientAuthenticationType values. - */ - public static Collection values() { - return values(PartnerClientAuthenticationType.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfiguration.java index 88349eacb688..36f53196b996 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfiguration.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfiguration.java @@ -34,7 +34,7 @@ public interface PartnerConfiguration { String type(); /** - * Gets the systemData property: The system metadata relating to partner configuration resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestination.java deleted file mode 100644 index 301406b1c620..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestination.java +++ /dev/null @@ -1,398 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; -import java.time.OffsetDateTime; -import java.util.Map; -import java.util.UUID; - -/** - * An immutable client-side representation of PartnerDestination. - */ -public interface PartnerDestination { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the systemData property: The system metadata relating to Partner Destination resource. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner registration. - * - * @return the partnerRegistrationImmutableId value. - */ - UUID partnerRegistrationImmutableId(); - - /** - * Gets the endpointServiceContext property: Endpoint context associated with this partner destination. - * - * @return the endpointServiceContext value. - */ - String endpointServiceContext(); - - /** - * Gets the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If this timer - * expires and the partner destination was never activated, - * the partner destination and corresponding channel are deleted. - * - * @return the expirationTimeIfNotActivatedUtc value. - */ - OffsetDateTime expirationTimeIfNotActivatedUtc(); - - /** - * Gets the provisioningState property: Provisioning state of the partner destination. - * - * @return the provisioningState value. - */ - PartnerDestinationProvisioningState provisioningState(); - - /** - * Gets the activationState property: Activation state of the partner destination. - * - * @return the activationState value. - */ - PartnerDestinationActivationState activationState(); - - /** - * Gets the endpointBaseUrl property: Endpoint Base URL of the partner destination. - * - * @return the endpointBaseUrl value. - */ - String endpointBaseUrl(); - - /** - * Gets the messageForActivation property: Context or helpful message that can be used during the approval process. - * - * @return the messageForActivation value. - */ - String messageForActivation(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner object. - * - * @return the inner object. - */ - PartnerDestinationInner innerModel(); - - /** - * The entirety of the PartnerDestination definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The PartnerDestination definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the PartnerDestination definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the PartnerDestination definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the PartnerDestination definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the PartnerDestination definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithPartnerRegistrationImmutableId, - DefinitionStages.WithEndpointServiceContext, DefinitionStages.WithExpirationTimeIfNotActivatedUtc, - DefinitionStages.WithActivationState, DefinitionStages.WithEndpointBaseUrl, - DefinitionStages.WithMessageForActivation { - /** - * Executes the create request. - * - * @return the created resource. - */ - PartnerDestination create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - PartnerDestination create(Context context); - } - - /** - * The stage of the PartnerDestination definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the PartnerDestination definition allowing to specify partnerRegistrationImmutableId. - */ - interface WithPartnerRegistrationImmutableId { - /** - * Specifies the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner - * registration.. - * - * @param partnerRegistrationImmutableId The immutable Id of the corresponding partner registration. - * @return the next definition stage. - */ - WithCreate withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId); - } - - /** - * The stage of the PartnerDestination definition allowing to specify endpointServiceContext. - */ - interface WithEndpointServiceContext { - /** - * Specifies the endpointServiceContext property: Endpoint context associated with this partner - * destination.. - * - * @param endpointServiceContext Endpoint context associated with this partner destination. - * @return the next definition stage. - */ - WithCreate withEndpointServiceContext(String endpointServiceContext); - } - - /** - * The stage of the PartnerDestination definition allowing to specify expirationTimeIfNotActivatedUtc. - */ - interface WithExpirationTimeIfNotActivatedUtc { - /** - * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If - * this timer expires and the partner destination was never activated, - * the partner destination and corresponding channel are deleted.. - * - * @param expirationTimeIfNotActivatedUtc Expiration time of the partner destination. If this timer expires - * and the partner destination was never activated, - * the partner destination and corresponding channel are deleted. - * @return the next definition stage. - */ - WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc); - } - - /** - * The stage of the PartnerDestination definition allowing to specify activationState. - */ - interface WithActivationState { - /** - * Specifies the activationState property: Activation state of the partner destination.. - * - * @param activationState Activation state of the partner destination. - * @return the next definition stage. - */ - WithCreate withActivationState(PartnerDestinationActivationState activationState); - } - - /** - * The stage of the PartnerDestination definition allowing to specify endpointBaseUrl. - */ - interface WithEndpointBaseUrl { - /** - * Specifies the endpointBaseUrl property: Endpoint Base URL of the partner destination. - * - * @param endpointBaseUrl Endpoint Base URL of the partner destination. - * @return the next definition stage. - */ - WithCreate withEndpointBaseUrl(String endpointBaseUrl); - } - - /** - * The stage of the PartnerDestination definition allowing to specify messageForActivation. - */ - interface WithMessageForActivation { - /** - * Specifies the messageForActivation property: Context or helpful message that can be used during the - * approval process.. - * - * @param messageForActivation Context or helpful message that can be used during the approval process. - * @return the next definition stage. - */ - WithCreate withMessageForActivation(String messageForActivation); - } - } - - /** - * Begins update for the PartnerDestination resource. - * - * @return the stage of resource update. - */ - PartnerDestination.Update update(); - - /** - * The template for PartnerDestination update. - */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - PartnerDestination apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - PartnerDestination apply(Context context); - } - - /** - * The PartnerDestination update stages. - */ - interface UpdateStages { - /** - * The stage of the PartnerDestination update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Tags of the Partner Destination resource.. - * - * @param tags Tags of the Partner Destination resource. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - PartnerDestination refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - PartnerDestination refresh(Context context); - - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response}. - */ - Response activateWithResponse(Context context); - - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - PartnerDestination activate(); -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationActivationState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationActivationState.java deleted file mode 100644 index fbf60be2096c..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationActivationState.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Activation state of the partner destination. - */ -public final class PartnerDestinationActivationState extends ExpandableStringEnum { - /** - * Static value NeverActivated for PartnerDestinationActivationState. - */ - public static final PartnerDestinationActivationState NEVER_ACTIVATED = fromString("NeverActivated"); - - /** - * Static value Activated for PartnerDestinationActivationState. - */ - public static final PartnerDestinationActivationState ACTIVATED = fromString("Activated"); - - /** - * Creates a new instance of PartnerDestinationActivationState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PartnerDestinationActivationState() { - } - - /** - * Creates or finds a PartnerDestinationActivationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PartnerDestinationActivationState. - */ - public static PartnerDestinationActivationState fromString(String name) { - return fromString(name, PartnerDestinationActivationState.class); - } - - /** - * Gets known PartnerDestinationActivationState values. - * - * @return known PartnerDestinationActivationState values. - */ - public static Collection values() { - return values(PartnerDestinationActivationState.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationInfo.java deleted file mode 100644 index f33b92d16f4c..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationInfo.java +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties of the corresponding partner destination of a Channel. - */ -@Fluent -public class PartnerDestinationInfo implements JsonSerializable { - /* - * Type of the endpoint for the partner destination - */ - private PartnerEndpointType endpointType = PartnerEndpointType.fromString("PartnerDestinationInfo"); - - /* - * Azure subscription ID of the subscriber. The partner destination associated with the channel will be - * created under this Azure subscription. - */ - private String azureSubscriptionId; - - /* - * Azure Resource Group of the subscriber. The partner destination associated with the channel will be - * created under this resource group. - */ - private String resourceGroupName; - - /* - * Name of the partner destination associated with the channel. - */ - private String name; - - /* - * Additional context of the partner destination endpoint. - */ - private String endpointServiceContext; - - /* - * Change history of the resource move. - */ - private List resourceMoveChangeHistory; - - /** - * Creates an instance of PartnerDestinationInfo class. - */ - public PartnerDestinationInfo() { - } - - /** - * Get the endpointType property: Type of the endpoint for the partner destination. - * - * @return the endpointType value. - */ - public PartnerEndpointType endpointType() { - return this.endpointType; - } - - /** - * Get the azureSubscriptionId property: Azure subscription ID of the subscriber. The partner destination associated - * with the channel will be - * created under this Azure subscription. - * - * @return the azureSubscriptionId value. - */ - public String azureSubscriptionId() { - return this.azureSubscriptionId; - } - - /** - * Set the azureSubscriptionId property: Azure subscription ID of the subscriber. The partner destination associated - * with the channel will be - * created under this Azure subscription. - * - * @param azureSubscriptionId the azureSubscriptionId value to set. - * @return the PartnerDestinationInfo object itself. - */ - public PartnerDestinationInfo withAzureSubscriptionId(String azureSubscriptionId) { - this.azureSubscriptionId = azureSubscriptionId; - return this; - } - - /** - * Get the resourceGroupName property: Azure Resource Group of the subscriber. The partner destination associated - * with the channel will be - * created under this resource group. - * - * @return the resourceGroupName value. - */ - public String resourceGroupName() { - return this.resourceGroupName; - } - - /** - * Set the resourceGroupName property: Azure Resource Group of the subscriber. The partner destination associated - * with the channel will be - * created under this resource group. - * - * @param resourceGroupName the resourceGroupName value to set. - * @return the PartnerDestinationInfo object itself. - */ - public PartnerDestinationInfo withResourceGroupName(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - /** - * Get the name property: Name of the partner destination associated with the channel. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the partner destination associated with the channel. - * - * @param name the name value to set. - * @return the PartnerDestinationInfo object itself. - */ - public PartnerDestinationInfo withName(String name) { - this.name = name; - return this; - } - - /** - * Get the endpointServiceContext property: Additional context of the partner destination endpoint. - * - * @return the endpointServiceContext value. - */ - public String endpointServiceContext() { - return this.endpointServiceContext; - } - - /** - * Set the endpointServiceContext property: Additional context of the partner destination endpoint. - * - * @param endpointServiceContext the endpointServiceContext value to set. - * @return the PartnerDestinationInfo object itself. - */ - public PartnerDestinationInfo withEndpointServiceContext(String endpointServiceContext) { - this.endpointServiceContext = endpointServiceContext; - return this; - } - - /** - * Get the resourceMoveChangeHistory property: Change history of the resource move. - * - * @return the resourceMoveChangeHistory value. - */ - public List resourceMoveChangeHistory() { - return this.resourceMoveChangeHistory; - } - - /** - * Set the resourceMoveChangeHistory property: Change history of the resource move. - * - * @param resourceMoveChangeHistory the resourceMoveChangeHistory value to set. - * @return the PartnerDestinationInfo object itself. - */ - public PartnerDestinationInfo - withResourceMoveChangeHistory(List resourceMoveChangeHistory) { - this.resourceMoveChangeHistory = resourceMoveChangeHistory; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resourceMoveChangeHistory() != null) { - resourceMoveChangeHistory().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); - jsonWriter.writeStringField("azureSubscriptionId", this.azureSubscriptionId); - jsonWriter.writeStringField("resourceGroupName", this.resourceGroupName); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("endpointServiceContext", this.endpointServiceContext); - jsonWriter.writeArrayField("resourceMoveChangeHistory", this.resourceMoveChangeHistory, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerDestinationInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerDestinationInfo if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartnerDestinationInfo. - */ - public static PartnerDestinationInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("endpointType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("WebHook".equals(discriminatorValue)) { - return WebhookPartnerDestinationInfo.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static PartnerDestinationInfo fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerDestinationInfo deserializedPartnerDestinationInfo = new PartnerDestinationInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("endpointType".equals(fieldName)) { - deserializedPartnerDestinationInfo.endpointType - = PartnerEndpointType.fromString(reader.getString()); - } else if ("azureSubscriptionId".equals(fieldName)) { - deserializedPartnerDestinationInfo.azureSubscriptionId = reader.getString(); - } else if ("resourceGroupName".equals(fieldName)) { - deserializedPartnerDestinationInfo.resourceGroupName = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPartnerDestinationInfo.name = reader.getString(); - } else if ("endpointServiceContext".equals(fieldName)) { - deserializedPartnerDestinationInfo.endpointServiceContext = reader.getString(); - } else if ("resourceMoveChangeHistory".equals(fieldName)) { - List resourceMoveChangeHistory - = reader.readArray(reader1 -> ResourceMoveChangeHistory.fromJson(reader1)); - deserializedPartnerDestinationInfo.resourceMoveChangeHistory = resourceMoveChangeHistory; - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerDestinationInfo; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationProvisioningState.java deleted file mode 100644 index fdcb370f4c33..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationProvisioningState.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of the partner destination. - */ -public final class PartnerDestinationProvisioningState - extends ExpandableStringEnum { - /** - * Static value Creating for PartnerDestinationProvisioningState. - */ - public static final PartnerDestinationProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Updating for PartnerDestinationProvisioningState. - */ - public static final PartnerDestinationProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for PartnerDestinationProvisioningState. - */ - public static final PartnerDestinationProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Succeeded for PartnerDestinationProvisioningState. - */ - public static final PartnerDestinationProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Canceled for PartnerDestinationProvisioningState. - */ - public static final PartnerDestinationProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Failed for PartnerDestinationProvisioningState. - */ - public static final PartnerDestinationProvisioningState FAILED = fromString("Failed"); - - /** - * Static value IdleDueToMirroredChannelResourceDeletion for PartnerDestinationProvisioningState. - */ - public static final PartnerDestinationProvisioningState IDLE_DUE_TO_MIRRORED_CHANNEL_RESOURCE_DELETION - = fromString("IdleDueToMirroredChannelResourceDeletion"); - - /** - * Creates a new instance of PartnerDestinationProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PartnerDestinationProvisioningState() { - } - - /** - * Creates or finds a PartnerDestinationProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PartnerDestinationProvisioningState. - */ - public static PartnerDestinationProvisioningState fromString(String name) { - return fromString(name, PartnerDestinationProvisioningState.class); - } - - /** - * Gets known PartnerDestinationProvisioningState values. - * - * @return known PartnerDestinationProvisioningState values. - */ - public static Collection values() { - return values(PartnerDestinationProvisioningState.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationUpdateParameters.java deleted file mode 100644 index 2f941896d597..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationUpdateParameters.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Properties of the Partner Destination that can be updated. - */ -@Fluent -public final class PartnerDestinationUpdateParameters implements JsonSerializable { - /* - * Tags of the Partner Destination resource. - */ - private Map tags; - - /** - * Creates an instance of PartnerDestinationUpdateParameters class. - */ - public PartnerDestinationUpdateParameters() { - } - - /** - * Get the tags property: Tags of the Partner Destination resource. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Tags of the Partner Destination resource. - * - * @param tags the tags value to set. - * @return the PartnerDestinationUpdateParameters object itself. - */ - public PartnerDestinationUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerDestinationUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerDestinationUpdateParameters if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartnerDestinationUpdateParameters. - */ - public static PartnerDestinationUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerDestinationUpdateParameters deserializedPartnerDestinationUpdateParameters - = new PartnerDestinationUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPartnerDestinationUpdateParameters.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerDestinationUpdateParameters; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinations.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinations.java deleted file mode 100644 index 115b0559eca8..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinations.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of PartnerDestinations. - */ -public interface PartnerDestinations { - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String partnerDestinationName, - Context context); - - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination. - */ - PartnerDestination getByResourceGroup(String resourceGroupName, String partnerDestinationName); - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String partnerDestinationName); - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String partnerDestinationName, Context context); - - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String filter, Integer top, Context context); - - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); - - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response}. - */ - Response activateWithResponse(String resourceGroupName, String partnerDestinationName, - Context context); - - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ - PartnerDestination activate(String resourceGroupName, String partnerDestinationName); - - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response}. - */ - PartnerDestination getById(String id); - - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new PartnerDestination resource. - * - * @param name resource name. - * @return the first stage of the new PartnerDestination definition. - */ - PartnerDestination.DefinitionStages.Blank define(String name); -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationsListResult.java deleted file mode 100644 index c67de8977496..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationsListResult.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; -import java.io.IOException; -import java.util.List; - -/** - * Result of the List Partner Destinations operation. - */ -@Fluent -public final class PartnerDestinationsListResult implements JsonSerializable { - /* - * A collection of partner destinations. - */ - private List value; - - /* - * A link for the next page of partner destinations. - */ - private String nextLink; - - /** - * Creates an instance of PartnerDestinationsListResult class. - */ - public PartnerDestinationsListResult() { - } - - /** - * Get the value property: A collection of partner destinations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A collection of partner destinations. - * - * @param value the value value to set. - * @return the PartnerDestinationsListResult object itself. - */ - public PartnerDestinationsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of partner destinations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A link for the next page of partner destinations. - * - * @param nextLink the nextLink value to set. - * @return the PartnerDestinationsListResult object itself. - */ - public PartnerDestinationsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerDestinationsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerDestinationsListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartnerDestinationsListResult. - */ - public static PartnerDestinationsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerDestinationsListResult deserializedPartnerDestinationsListResult - = new PartnerDestinationsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PartnerDestinationInner.fromJson(reader1)); - deserializedPartnerDestinationsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPartnerDestinationsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerDestinationsListResult; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEndpointType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEndpointType.java deleted file mode 100644 index 989776540104..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEndpointType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of the endpoint for the partner destination. - */ -public final class PartnerEndpointType extends ExpandableStringEnum { - /** - * Static value WebHook for PartnerEndpointType. - */ - public static final PartnerEndpointType WEB_HOOK = fromString("WebHook"); - - /** - * Creates a new instance of PartnerEndpointType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PartnerEndpointType() { - } - - /** - * Creates or finds a PartnerEndpointType from its string representation. - * - * @param name a name to look for. - * @return the corresponding PartnerEndpointType. - */ - public static PartnerEndpointType fromString(String name) { - return fromString(name, PartnerEndpointType.class); - } - - /** - * Gets known PartnerEndpointType values. - * - * @return known PartnerEndpointType values. - */ - public static Collection values() { - return values(PartnerEndpointType.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEventSubscriptionDestination.java deleted file mode 100644 index 4674321d8fef..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEventSubscriptionDestination.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerEventSubscriptionDestinationProperties; -import java.io.IOException; - -/** - * The PartnerEventSubscriptionDestination model. - */ -@Fluent -public final class PartnerEventSubscriptionDestination extends EventSubscriptionDestination { - /* - * Type of the endpoint for the event subscription destination. - */ - private EndpointType endpointType = EndpointType.PARTNER_DESTINATION; - - /* - * Partner Destination Properties of the event subscription destination. - */ - private PartnerEventSubscriptionDestinationProperties innerProperties; - - /** - * Creates an instance of PartnerEventSubscriptionDestination class. - */ - public PartnerEventSubscriptionDestination() { - } - - /** - * Get the endpointType property: Type of the endpoint for the event subscription destination. - * - * @return the endpointType value. - */ - @Override - public EndpointType endpointType() { - return this.endpointType; - } - - /** - * Get the innerProperties property: Partner Destination Properties of the event subscription destination. - * - * @return the innerProperties value. - */ - private PartnerEventSubscriptionDestinationProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the resourceId property: The Azure Resource Id that represents the endpoint of a Partner Destination of an - * event subscription. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.innerProperties() == null ? null : this.innerProperties().resourceId(); - } - - /** - * Set the resourceId property: The Azure Resource Id that represents the endpoint of a Partner Destination of an - * event subscription. - * - * @param resourceId the resourceId value to set. - * @return the PartnerEventSubscriptionDestination object itself. - */ - public PartnerEventSubscriptionDestination withResourceId(String resourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new PartnerEventSubscriptionDestinationProperties(); - } - this.innerProperties().withResourceId(resourceId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerEventSubscriptionDestination from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerEventSubscriptionDestination if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartnerEventSubscriptionDestination. - */ - public static PartnerEventSubscriptionDestination fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerEventSubscriptionDestination deserializedPartnerEventSubscriptionDestination - = new PartnerEventSubscriptionDestination(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("endpointType".equals(fieldName)) { - deserializedPartnerEventSubscriptionDestination.endpointType - = EndpointType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedPartnerEventSubscriptionDestination.innerProperties - = PartnerEventSubscriptionDestinationProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerEventSubscriptionDestination; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespace.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespace.java index acc20aee58fa..7e804b08ab1a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespace.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespace.java @@ -52,7 +52,7 @@ public interface PartnerNamespace { Map tags(); /** - * Gets the systemData property: The system metadata relating to Partner Namespace resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistration.java index c80eaa8dfeb7..ff89e48d53f6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistration.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistration.java @@ -51,7 +51,7 @@ public interface PartnerRegistration { Map tags(); /** - * Gets the systemData property: The system metadata relating to Partner Registration resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopic.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopic.java index 2a5856f52648..2acafe873f69 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopic.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopic.java @@ -53,7 +53,7 @@ public interface PartnerTopic { Map tags(); /** - * Gets the systemData property: The system metadata relating to Partner Topic resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateDestinationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateDestinationInfo.java deleted file mode 100644 index 1561fa4ae147..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateDestinationInfo.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of the corresponding partner destination of a Channel. - */ -@Immutable -public class PartnerUpdateDestinationInfo implements JsonSerializable { - /* - * Type of the endpoint for the partner destination - */ - private PartnerEndpointType endpointType = PartnerEndpointType.fromString("PartnerUpdateDestinationInfo"); - - /** - * Creates an instance of PartnerUpdateDestinationInfo class. - */ - public PartnerUpdateDestinationInfo() { - } - - /** - * Get the endpointType property: Type of the endpoint for the partner destination. - * - * @return the endpointType value. - */ - public PartnerEndpointType endpointType() { - return this.endpointType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerUpdateDestinationInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerUpdateDestinationInfo if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartnerUpdateDestinationInfo. - */ - public static PartnerUpdateDestinationInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("endpointType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("WebHook".equals(discriminatorValue)) { - return WebhookUpdatePartnerDestinationInfo.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static PartnerUpdateDestinationInfo fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerUpdateDestinationInfo deserializedPartnerUpdateDestinationInfo = new PartnerUpdateDestinationInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("endpointType".equals(fieldName)) { - deserializedPartnerUpdateDestinationInfo.endpointType - = PartnerEndpointType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerUpdateDestinationInfo; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBinding.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBinding.java index 8293b6a3eb0d..2e70b12a1b8b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBinding.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBinding.java @@ -34,7 +34,7 @@ public interface PermissionBinding { String type(); /** - * Gets the systemData property: The system metadata relating to the PermissionBinding resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublicNetworkAccess.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublicNetworkAccess.java index 0756cad18dc4..e7627406a151 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublicNetworkAccess.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublicNetworkAccess.java @@ -23,11 +23,6 @@ public final class PublicNetworkAccess extends ExpandableStringEnum { - /* - * Association name - */ - private String name; - - /* - * Network security perimeter access mode. - */ - private NetworkSecurityPerimeterAssociationAccessMode accessMode; - - /** - * Creates an instance of ResourceAssociation class. - */ - public ResourceAssociation() { - } - - /** - * Get the name property: Association name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Association name. - * - * @param name the name value to set. - * @return the ResourceAssociation object itself. - */ - public ResourceAssociation withName(String name) { - this.name = name; - return this; - } - - /** - * Get the accessMode property: Network security perimeter access mode. - * - * @return the accessMode value. - */ - public NetworkSecurityPerimeterAssociationAccessMode accessMode() { - return this.accessMode; - } - - /** - * Set the accessMode property: Network security perimeter access mode. - * - * @param accessMode the accessMode value to set. - * @return the ResourceAssociation object itself. - */ - public ResourceAssociation withAccessMode(NetworkSecurityPerimeterAssociationAccessMode accessMode) { - this.accessMode = accessMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("accessMode", this.accessMode == null ? null : this.accessMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceAssociation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceAssociation if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ResourceAssociation. - */ - public static ResourceAssociation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceAssociation deserializedResourceAssociation = new ResourceAssociation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedResourceAssociation.name = reader.getString(); - } else if ("accessMode".equals(fieldName)) { - deserializedResourceAssociation.accessMode - = NetworkSecurityPerimeterAssociationAccessMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceAssociation; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceKind.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceKind.java deleted file mode 100644 index e1269079a480..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceKind.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Kind of the resource. - */ -public final class ResourceKind extends ExpandableStringEnum { - /** - * Static value Azure for ResourceKind. - */ - public static final ResourceKind AZURE = fromString("Azure"); - - /** - * Static value AzureArc for ResourceKind. - */ - public static final ResourceKind AZURE_ARC = fromString("AzureArc"); - - /** - * Creates a new instance of ResourceKind value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ResourceKind() { - } - - /** - * Creates or finds a ResourceKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResourceKind. - */ - public static ResourceKind fromString(String name) { - return fromString(name, ResourceKind.class); - } - - /** - * Gets known ResourceKind values. - * - * @return known ResourceKind values. - */ - public static Collection values() { - return values(ResourceKind.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceMoveChangeHistory.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceMoveChangeHistory.java deleted file mode 100644 index 2f8c53a3438d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceMoveChangeHistory.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * The change history of the resource move. - */ -@Fluent -public final class ResourceMoveChangeHistory implements JsonSerializable { - /* - * Azure subscription ID of the resource. - */ - private String azureSubscriptionId; - - /* - * Azure Resource Group of the resource. - */ - private String resourceGroupName; - - /* - * UTC timestamp of when the resource was changed. - */ - private OffsetDateTime changedTimeUtc; - - /** - * Creates an instance of ResourceMoveChangeHistory class. - */ - public ResourceMoveChangeHistory() { - } - - /** - * Get the azureSubscriptionId property: Azure subscription ID of the resource. - * - * @return the azureSubscriptionId value. - */ - public String azureSubscriptionId() { - return this.azureSubscriptionId; - } - - /** - * Set the azureSubscriptionId property: Azure subscription ID of the resource. - * - * @param azureSubscriptionId the azureSubscriptionId value to set. - * @return the ResourceMoveChangeHistory object itself. - */ - public ResourceMoveChangeHistory withAzureSubscriptionId(String azureSubscriptionId) { - this.azureSubscriptionId = azureSubscriptionId; - return this; - } - - /** - * Get the resourceGroupName property: Azure Resource Group of the resource. - * - * @return the resourceGroupName value. - */ - public String resourceGroupName() { - return this.resourceGroupName; - } - - /** - * Set the resourceGroupName property: Azure Resource Group of the resource. - * - * @param resourceGroupName the resourceGroupName value to set. - * @return the ResourceMoveChangeHistory object itself. - */ - public ResourceMoveChangeHistory withResourceGroupName(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - /** - * Get the changedTimeUtc property: UTC timestamp of when the resource was changed. - * - * @return the changedTimeUtc value. - */ - public OffsetDateTime changedTimeUtc() { - return this.changedTimeUtc; - } - - /** - * Set the changedTimeUtc property: UTC timestamp of when the resource was changed. - * - * @param changedTimeUtc the changedTimeUtc value to set. - * @return the ResourceMoveChangeHistory object itself. - */ - public ResourceMoveChangeHistory withChangedTimeUtc(OffsetDateTime changedTimeUtc) { - this.changedTimeUtc = changedTimeUtc; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("azureSubscriptionId", this.azureSubscriptionId); - jsonWriter.writeStringField("resourceGroupName", this.resourceGroupName); - jsonWriter.writeStringField("changedTimeUtc", - this.changedTimeUtc == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.changedTimeUtc)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceMoveChangeHistory from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceMoveChangeHistory if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ResourceMoveChangeHistory. - */ - public static ResourceMoveChangeHistory fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceMoveChangeHistory deserializedResourceMoveChangeHistory = new ResourceMoveChangeHistory(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("azureSubscriptionId".equals(fieldName)) { - deserializedResourceMoveChangeHistory.azureSubscriptionId = reader.getString(); - } else if ("resourceGroupName".equals(fieldName)) { - deserializedResourceMoveChangeHistory.resourceGroupName = reader.getString(); - } else if ("changedTimeUtc".equals(fieldName)) { - deserializedResourceMoveChangeHistory.changedTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceMoveChangeHistory; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceSku.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceSku.java deleted file mode 100644 index f462aefc5dee..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceSku.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes an EventGrid Resource Sku. - */ -@Fluent -public final class ResourceSku implements JsonSerializable { - /* - * The Sku name of the resource. The possible values are: Basic or Premium. - */ - private Sku name; - - /** - * Creates an instance of ResourceSku class. - */ - public ResourceSku() { - } - - /** - * Get the name property: The Sku name of the resource. The possible values are: Basic or Premium. - * - * @return the name value. - */ - public Sku name() { - return this.name; - } - - /** - * Set the name property: The Sku name of the resource. The possible values are: Basic or Premium. - * - * @param name the name value to set. - * @return the ResourceSku object itself. - */ - public ResourceSku withName(Sku name) { - this.name = name; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceSku from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceSku if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ResourceSku. - */ - public static ResourceSku fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceSku deserializedResourceSku = new ResourceSku(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedResourceSku.name = Sku.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceSku; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Sku.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Sku.java deleted file mode 100644 index 794aeca1c8ee..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Sku.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The Sku name of the resource. The possible values are: Basic or Premium. - */ -public final class Sku extends ExpandableStringEnum { - /** - * Static value Basic for Sku. - */ - public static final Sku BASIC = fromString("Basic"); - - /** - * Static value Premium for Sku. - */ - public static final Sku PREMIUM = fromString("Premium"); - - /** - * Creates a new instance of Sku value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Sku() { - } - - /** - * Creates or finds a Sku from its string representation. - * - * @param name a name to look for. - * @return the corresponding Sku. - */ - public static Sku fromString(String name) { - return fromString(name, Sku.class); - } - - /** - * Gets known Sku values. - * - * @return known Sku values. - */ - public static Collection values() { - return values(Sku.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Subscription.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Subscription.java index 39900a2e6921..9f5ceff0d97d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Subscription.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Subscription.java @@ -36,7 +36,7 @@ public interface Subscription { String type(); /** - * Gets the systemData property: The system metadata relating to Event Subscription resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopic.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopic.java index 324d7d453456..78ac3058910a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopic.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopic.java @@ -50,7 +50,7 @@ public interface SystemTopic { Map tags(); /** - * Gets the systemData property: The system metadata relating to System Topic resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java index c25f9daf5b4a..fbf4041ec4e3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java @@ -13,39 +13,6 @@ * Resource collection API of SystemTopicEventSubscriptions. */ public interface SystemTopicEventSubscriptions { - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. - */ - Response getDeliveryAttributesWithResponse(String resourceGroupName, - String systemTopicName, String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. - */ - DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String systemTopicName, - String eventSubscriptionName); - /** * Get an event subscription of a system topic. * @@ -249,4 +216,37 @@ Response getFullUrlWithResponse(String resourceGroupNa */ PagedIterable listBySystemTopic(String resourceGroupName, String systemTopicName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription along with {@link Response}. + */ + Response getDeliveryAttributesWithResponse(String resourceGroupName, + String systemTopicName, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all delivery attributes for an event subscription. + */ + DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String systemTopicName, + String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topic.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topic.java index 647d7bf351df..a53eeebdb37f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topic.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topic.java @@ -51,13 +51,6 @@ public interface Topic { */ Map tags(); - /** - * Gets the sku property: The Sku pricing tier for the topic. - * - * @return the sku value. - */ - ResourceSku sku(); - /** * Gets the identity property: Identity information for the resource. * @@ -66,21 +59,7 @@ public interface Topic { IdentityInfo identity(); /** - * Gets the kind property: Kind of the resource. - * - * @return the kind value. - */ - ResourceKind kind(); - - /** - * Gets the extendedLocation property: Extended location of the resource. - * - * @return the extendedLocation value. - */ - ExtendedLocation extendedLocation(); - - /** - * Gets the systemData property: The system metadata relating to Topic resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -265,12 +244,11 @@ interface WithResourceGroup { * The stage of the Topic definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku, DefinitionStages.WithIdentity, - DefinitionStages.WithKind, DefinitionStages.WithExtendedLocation, DefinitionStages.WithEventTypeInfo, - DefinitionStages.WithMinimumTlsVersionAllowed, DefinitionStages.WithInputSchema, - DefinitionStages.WithInputSchemaMapping, DefinitionStages.WithPublicNetworkAccess, - DefinitionStages.WithInboundIpRules, DefinitionStages.WithDisableLocalAuth, - DefinitionStages.WithDataResidencyBoundary { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithEventTypeInfo, DefinitionStages.WithMinimumTlsVersionAllowed, + DefinitionStages.WithInputSchema, DefinitionStages.WithInputSchemaMapping, + DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithInboundIpRules, + DefinitionStages.WithDisableLocalAuth, DefinitionStages.WithDataResidencyBoundary { /** * Executes the create request. * @@ -300,19 +278,6 @@ interface WithTags { WithCreate withTags(Map tags); } - /** - * The stage of the Topic definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: The Sku pricing tier for the topic.. - * - * @param sku The Sku pricing tier for the topic. - * @return the next definition stage. - */ - WithCreate withSku(ResourceSku sku); - } - /** * The stage of the Topic definition allowing to specify identity. */ @@ -326,32 +291,6 @@ interface WithIdentity { WithCreate withIdentity(IdentityInfo identity); } - /** - * The stage of the Topic definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Kind of the resource.. - * - * @param kind Kind of the resource. - * @return the next definition stage. - */ - WithCreate withKind(ResourceKind kind); - } - - /** - * The stage of the Topic definition allowing to specify extendedLocation. - */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: Extended location of the resource.. - * - * @param extendedLocation Extended location of the resource. - * @return the next definition stage. - */ - WithCreate withExtendedLocation(ExtendedLocation extendedLocation); - } - /** * The stage of the Topic definition allowing to specify eventTypeInfo. */ @@ -490,9 +429,8 @@ interface WithDataResidencyBoundary { /** * The template for Topic update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, - UpdateStages.WithPublicNetworkAccess, UpdateStages.WithInboundIpRules, - UpdateStages.WithMinimumTlsVersionAllowed, UpdateStages.WithDisableLocalAuth, + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithPublicNetworkAccess, + UpdateStages.WithInboundIpRules, UpdateStages.WithMinimumTlsVersionAllowed, UpdateStages.WithDisableLocalAuth, UpdateStages.WithDataResidencyBoundary, UpdateStages.WithEventTypeInfo { /** * Executes the update request. @@ -540,19 +478,6 @@ interface WithIdentity { Update withIdentity(IdentityInfo identity); } - /** - * The stage of the Topic update allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: The Sku pricing tier for the topic.. - * - * @param sku The Sku pricing tier for the topic. - * @return the next definition stage. - */ - Update withSku(ResourceSku sku); - } - /** * The stage of the Topic update allowing to specify publicNetworkAccess. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpace.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpace.java index beed976a0165..696b1c25401a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpace.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpace.java @@ -35,7 +35,7 @@ public interface TopicSpace { String type(); /** - * Gets the systemData property: The system metadata relating to the TopicSpace resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfiguration.java index 7107136af1b1..c9a0dc97f765 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfiguration.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfiguration.java @@ -41,11 +41,6 @@ public final class TopicSpacesConfiguration implements JsonSerializable writer.writeString(element)); jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -320,8 +291,6 @@ public static TopicUpdateParameters fromJson(JsonReader jsonReader) throws IOExc deserializedTopicUpdateParameters.identity = IdentityInfo.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedTopicUpdateParameters.innerProperties = TopicUpdateParameterProperties.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedTopicUpdateParameters.sku = ResourceSku.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicSpacesConfigurationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicSpacesConfigurationInfo.java index 468617956599..007002b9c33b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicSpacesConfigurationInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicSpacesConfigurationInfo.java @@ -33,11 +33,6 @@ public final class UpdateTopicSpacesConfigurationInfo implements JsonSerializabl */ private RoutingEnrichments routingEnrichments; - /* - * Client authentication settings for topic spaces configuration. - */ - private ClientAuthenticationSettings clientAuthentication; - /* * The maximum session expiry in hours. The property default value is 1 hour. * Min allowed value is 1 hour and max allowed value is 8 hours. @@ -128,27 +123,6 @@ public UpdateTopicSpacesConfigurationInfo withRoutingEnrichments(RoutingEnrichme return this; } - /** - * Get the clientAuthentication property: Client authentication settings for topic spaces configuration. - * - * @return the clientAuthentication value. - */ - public ClientAuthenticationSettings clientAuthentication() { - return this.clientAuthentication; - } - - /** - * Set the clientAuthentication property: Client authentication settings for topic spaces configuration. - * - * @param clientAuthentication the clientAuthentication value to set. - * @return the UpdateTopicSpacesConfigurationInfo object itself. - */ - public UpdateTopicSpacesConfigurationInfo - withClientAuthentication(ClientAuthenticationSettings clientAuthentication) { - this.clientAuthentication = clientAuthentication; - return this; - } - /** * Get the maximumSessionExpiryInHours property: The maximum session expiry in hours. The property default value is * 1 hour. @@ -247,9 +221,6 @@ public void validate() { if (routingEnrichments() != null) { routingEnrichments().validate(); } - if (clientAuthentication() != null) { - clientAuthentication().validate(); - } if (routingIdentityInfo() != null) { routingIdentityInfo().validate(); } @@ -267,7 +238,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); jsonWriter.writeStringField("routeTopicResourceId", this.routeTopicResourceId); jsonWriter.writeJsonField("routingEnrichments", this.routingEnrichments); - jsonWriter.writeJsonField("clientAuthentication", this.clientAuthentication); jsonWriter.writeNumberField("maximumSessionExpiryInHours", this.maximumSessionExpiryInHours); jsonWriter.writeNumberField("maximumClientSessionsPerAuthenticationName", this.maximumClientSessionsPerAuthenticationName); @@ -300,9 +270,6 @@ public static UpdateTopicSpacesConfigurationInfo fromJson(JsonReader jsonReader) } else if ("routingEnrichments".equals(fieldName)) { deserializedUpdateTopicSpacesConfigurationInfo.routingEnrichments = RoutingEnrichments.fromJson(reader); - } else if ("clientAuthentication".equals(fieldName)) { - deserializedUpdateTopicSpacesConfigurationInfo.clientAuthentication - = ClientAuthenticationSettings.fromJson(reader); } else if ("maximumSessionExpiryInHours".equals(fieldName)) { deserializedUpdateTopicSpacesConfigurationInfo.maximumSessionExpiryInHours = reader.getNullable(JsonReader::getInt); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartner.java index 405625a9e96a..7d26265fd0a1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartner.java @@ -34,7 +34,7 @@ public interface VerifiedPartner { String type(); /** - * Gets the systemData property: The system metadata relating to Verified Partner resource. + * Gets the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -68,13 +68,6 @@ public interface VerifiedPartner { */ PartnerDetails partnerTopicDetails(); - /** - * Gets the partnerDestinationDetails property: Details of the partner destination scenario. - * - * @return the partnerDestinationDetails value. - */ - PartnerDetails partnerDestinationDetails(); - /** * Gets the provisioningState property: Provisioning state of the verified partner. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookPartnerDestinationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookPartnerDestinationInfo.java deleted file mode 100644 index 2267bde3743b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookPartnerDestinationInfo.java +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.fluent.models.WebhookPartnerDestinationProperties; -import java.io.IOException; -import java.util.List; - -/** - * Information about the WebHook of the partner destination. - */ -@Fluent -public final class WebhookPartnerDestinationInfo extends PartnerDestinationInfo { - /* - * Type of the endpoint for the partner destination - */ - private PartnerEndpointType endpointType = PartnerEndpointType.WEB_HOOK; - - /* - * WebHook Properties of the partner destination. - */ - private WebhookPartnerDestinationProperties innerProperties; - - /** - * Creates an instance of WebhookPartnerDestinationInfo class. - */ - public WebhookPartnerDestinationInfo() { - } - - /** - * Get the endpointType property: Type of the endpoint for the partner destination. - * - * @return the endpointType value. - */ - @Override - public PartnerEndpointType endpointType() { - return this.endpointType; - } - - /** - * Get the innerProperties property: WebHook Properties of the partner destination. - * - * @return the innerProperties value. - */ - private WebhookPartnerDestinationProperties innerProperties() { - return this.innerProperties; - } - - /** - * {@inheritDoc} - */ - @Override - public WebhookPartnerDestinationInfo withAzureSubscriptionId(String azureSubscriptionId) { - super.withAzureSubscriptionId(azureSubscriptionId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public WebhookPartnerDestinationInfo withResourceGroupName(String resourceGroupName) { - super.withResourceGroupName(resourceGroupName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public WebhookPartnerDestinationInfo withName(String name) { - super.withName(name); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public WebhookPartnerDestinationInfo withEndpointServiceContext(String endpointServiceContext) { - super.withEndpointServiceContext(endpointServiceContext); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public WebhookPartnerDestinationInfo - withResourceMoveChangeHistory(List resourceMoveChangeHistory) { - super.withResourceMoveChangeHistory(resourceMoveChangeHistory); - return this; - } - - /** - * Get the endpointUrl property: The URL that represents the endpoint of the partner destination. - * - * @return the endpointUrl value. - */ - public String endpointUrl() { - return this.innerProperties() == null ? null : this.innerProperties().endpointUrl(); - } - - /** - * Set the endpointUrl property: The URL that represents the endpoint of the partner destination. - * - * @param endpointUrl the endpointUrl value to set. - * @return the WebhookPartnerDestinationInfo object itself. - */ - public WebhookPartnerDestinationInfo withEndpointUrl(String endpointUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPartnerDestinationProperties(); - } - this.innerProperties().withEndpointUrl(endpointUrl); - return this; - } - - /** - * Get the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. - * - * @return the endpointBaseUrl value. - */ - public String endpointBaseUrl() { - return this.innerProperties() == null ? null : this.innerProperties().endpointBaseUrl(); - } - - /** - * Set the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. - * - * @param endpointBaseUrl the endpointBaseUrl value to set. - * @return the WebhookPartnerDestinationInfo object itself. - */ - public WebhookPartnerDestinationInfo withEndpointBaseUrl(String endpointBaseUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPartnerDestinationProperties(); - } - this.innerProperties().withEndpointBaseUrl(endpointBaseUrl); - return this; - } - - /** - * Get the clientAuthentication property: Partner client authentication. - * - * @return the clientAuthentication value. - */ - public PartnerClientAuthentication clientAuthentication() { - return this.innerProperties() == null ? null : this.innerProperties().clientAuthentication(); - } - - /** - * Set the clientAuthentication property: Partner client authentication. - * - * @param clientAuthentication the clientAuthentication value to set. - * @return the WebhookPartnerDestinationInfo object itself. - */ - public WebhookPartnerDestinationInfo withClientAuthentication(PartnerClientAuthentication clientAuthentication) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPartnerDestinationProperties(); - } - this.innerProperties().withClientAuthentication(clientAuthentication); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (resourceMoveChangeHistory() != null) { - resourceMoveChangeHistory().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("azureSubscriptionId", azureSubscriptionId()); - jsonWriter.writeStringField("resourceGroupName", resourceGroupName()); - jsonWriter.writeStringField("name", name()); - jsonWriter.writeStringField("endpointServiceContext", endpointServiceContext()); - jsonWriter.writeArrayField("resourceMoveChangeHistory", resourceMoveChangeHistory(), - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebhookPartnerDestinationInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebhookPartnerDestinationInfo if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WebhookPartnerDestinationInfo. - */ - public static WebhookPartnerDestinationInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebhookPartnerDestinationInfo deserializedWebhookPartnerDestinationInfo - = new WebhookPartnerDestinationInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("azureSubscriptionId".equals(fieldName)) { - deserializedWebhookPartnerDestinationInfo.withAzureSubscriptionId(reader.getString()); - } else if ("resourceGroupName".equals(fieldName)) { - deserializedWebhookPartnerDestinationInfo.withResourceGroupName(reader.getString()); - } else if ("name".equals(fieldName)) { - deserializedWebhookPartnerDestinationInfo.withName(reader.getString()); - } else if ("endpointServiceContext".equals(fieldName)) { - deserializedWebhookPartnerDestinationInfo.withEndpointServiceContext(reader.getString()); - } else if ("resourceMoveChangeHistory".equals(fieldName)) { - List resourceMoveChangeHistory - = reader.readArray(reader1 -> ResourceMoveChangeHistory.fromJson(reader1)); - deserializedWebhookPartnerDestinationInfo.withResourceMoveChangeHistory(resourceMoveChangeHistory); - } else if ("endpointType".equals(fieldName)) { - deserializedWebhookPartnerDestinationInfo.endpointType - = PartnerEndpointType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedWebhookPartnerDestinationInfo.innerProperties - = WebhookPartnerDestinationProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWebhookPartnerDestinationInfo; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookUpdatePartnerDestinationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookUpdatePartnerDestinationInfo.java deleted file mode 100644 index 6ceb627947bb..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookUpdatePartnerDestinationInfo.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventgrid.fluent.models.WebhookPartnerDestinationProperties; -import java.io.IOException; - -/** - * Information about the update of the WebHook of the partner destination. - */ -@Fluent -public final class WebhookUpdatePartnerDestinationInfo extends PartnerUpdateDestinationInfo { - /* - * Type of the endpoint for the partner destination - */ - private PartnerEndpointType endpointType = PartnerEndpointType.WEB_HOOK; - - /* - * WebHook Properties of the partner destination. - */ - private WebhookPartnerDestinationProperties innerProperties; - - /** - * Creates an instance of WebhookUpdatePartnerDestinationInfo class. - */ - public WebhookUpdatePartnerDestinationInfo() { - } - - /** - * Get the endpointType property: Type of the endpoint for the partner destination. - * - * @return the endpointType value. - */ - @Override - public PartnerEndpointType endpointType() { - return this.endpointType; - } - - /** - * Get the innerProperties property: WebHook Properties of the partner destination. - * - * @return the innerProperties value. - */ - private WebhookPartnerDestinationProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the endpointUrl property: The URL that represents the endpoint of the partner destination. - * - * @return the endpointUrl value. - */ - public String endpointUrl() { - return this.innerProperties() == null ? null : this.innerProperties().endpointUrl(); - } - - /** - * Set the endpointUrl property: The URL that represents the endpoint of the partner destination. - * - * @param endpointUrl the endpointUrl value to set. - * @return the WebhookUpdatePartnerDestinationInfo object itself. - */ - public WebhookUpdatePartnerDestinationInfo withEndpointUrl(String endpointUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPartnerDestinationProperties(); - } - this.innerProperties().withEndpointUrl(endpointUrl); - return this; - } - - /** - * Get the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. - * - * @return the endpointBaseUrl value. - */ - public String endpointBaseUrl() { - return this.innerProperties() == null ? null : this.innerProperties().endpointBaseUrl(); - } - - /** - * Set the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. - * - * @param endpointBaseUrl the endpointBaseUrl value to set. - * @return the WebhookUpdatePartnerDestinationInfo object itself. - */ - public WebhookUpdatePartnerDestinationInfo withEndpointBaseUrl(String endpointBaseUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPartnerDestinationProperties(); - } - this.innerProperties().withEndpointBaseUrl(endpointBaseUrl); - return this; - } - - /** - * Get the clientAuthentication property: Partner client authentication. - * - * @return the clientAuthentication value. - */ - public PartnerClientAuthentication clientAuthentication() { - return this.innerProperties() == null ? null : this.innerProperties().clientAuthentication(); - } - - /** - * Set the clientAuthentication property: Partner client authentication. - * - * @param clientAuthentication the clientAuthentication value to set. - * @return the WebhookUpdatePartnerDestinationInfo object itself. - */ - public WebhookUpdatePartnerDestinationInfo - withClientAuthentication(PartnerClientAuthentication clientAuthentication) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPartnerDestinationProperties(); - } - this.innerProperties().withClientAuthentication(clientAuthentication); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebhookUpdatePartnerDestinationInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebhookUpdatePartnerDestinationInfo if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WebhookUpdatePartnerDestinationInfo. - */ - public static WebhookUpdatePartnerDestinationInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebhookUpdatePartnerDestinationInfo deserializedWebhookUpdatePartnerDestinationInfo - = new WebhookUpdatePartnerDestinationInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("endpointType".equals(fieldName)) { - deserializedWebhookUpdatePartnerDestinationInfo.endpointType - = PartnerEndpointType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedWebhookUpdatePartnerDestinationInfo.innerProperties - = WebhookPartnerDestinationProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWebhookUpdatePartnerDestinationInfo; - }); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventgrid/proxy-config.json b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventgrid/proxy-config.json index e3b65b62f87f..93c3498f73b0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventgrid/proxy-config.json +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventgrid/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.eventgrid.implementation.CaCertificatesClientImpl$CaCertificatesService"],["com.azure.resourcemanager.eventgrid.implementation.ChannelsClientImpl$ChannelsService"],["com.azure.resourcemanager.eventgrid.implementation.ClientGroupsClientImpl$ClientGroupsService"],["com.azure.resourcemanager.eventgrid.implementation.ClientsClientImpl$ClientsService"],["com.azure.resourcemanager.eventgrid.implementation.DomainEventSubscriptionsClientImpl$DomainEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.DomainTopicEventSubscriptionsClientImpl$DomainTopicEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.DomainTopicsClientImpl$DomainTopicsService"],["com.azure.resourcemanager.eventgrid.implementation.DomainsClientImpl$DomainsService"],["com.azure.resourcemanager.eventgrid.implementation.EventSubscriptionsClientImpl$EventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.ExtensionTopicsClientImpl$ExtensionTopicsService"],["com.azure.resourcemanager.eventgrid.implementation.NamespaceTopicEventSubscriptionsClientImpl$NamespaceTopicEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.NamespaceTopicsClientImpl$NamespaceTopicsService"],["com.azure.resourcemanager.eventgrid.implementation.NamespacesClientImpl$NamespacesService"],["com.azure.resourcemanager.eventgrid.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService"],["com.azure.resourcemanager.eventgrid.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.eventgrid.implementation.PartnerConfigurationsClientImpl$PartnerConfigurationsService"],["com.azure.resourcemanager.eventgrid.implementation.PartnerDestinationsClientImpl$PartnerDestinationsService"],["com.azure.resourcemanager.eventgrid.implementation.PartnerNamespacesClientImpl$PartnerNamespacesService"],["com.azure.resourcemanager.eventgrid.implementation.PartnerRegistrationsClientImpl$PartnerRegistrationsService"],["com.azure.resourcemanager.eventgrid.implementation.PartnerTopicEventSubscriptionsClientImpl$PartnerTopicEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.PartnerTopicsClientImpl$PartnerTopicsService"],["com.azure.resourcemanager.eventgrid.implementation.PermissionBindingsClientImpl$PermissionBindingsService"],["com.azure.resourcemanager.eventgrid.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.eventgrid.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.eventgrid.implementation.SystemTopicEventSubscriptionsClientImpl$SystemTopicEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.SystemTopicsClientImpl$SystemTopicsService"],["com.azure.resourcemanager.eventgrid.implementation.TopicEventSubscriptionsClientImpl$TopicEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.TopicSpacesClientImpl$TopicSpacesService"],["com.azure.resourcemanager.eventgrid.implementation.TopicTypesClientImpl$TopicTypesService"],["com.azure.resourcemanager.eventgrid.implementation.TopicsClientImpl$TopicsService"],["com.azure.resourcemanager.eventgrid.implementation.VerifiedPartnersClientImpl$VerifiedPartnersService"]] \ No newline at end of file +[["com.azure.resourcemanager.eventgrid.implementation.CaCertificatesClientImpl$CaCertificatesService"],["com.azure.resourcemanager.eventgrid.implementation.ChannelsClientImpl$ChannelsService"],["com.azure.resourcemanager.eventgrid.implementation.ClientGroupsClientImpl$ClientGroupsService"],["com.azure.resourcemanager.eventgrid.implementation.ClientsClientImpl$ClientsService"],["com.azure.resourcemanager.eventgrid.implementation.DomainEventSubscriptionsClientImpl$DomainEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.DomainTopicEventSubscriptionsClientImpl$DomainTopicEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.DomainTopicsClientImpl$DomainTopicsService"],["com.azure.resourcemanager.eventgrid.implementation.DomainsClientImpl$DomainsService"],["com.azure.resourcemanager.eventgrid.implementation.EventSubscriptionsClientImpl$EventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.ExtensionTopicsClientImpl$ExtensionTopicsService"],["com.azure.resourcemanager.eventgrid.implementation.NamespaceTopicEventSubscriptionsClientImpl$NamespaceTopicEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.NamespaceTopicsClientImpl$NamespaceTopicsService"],["com.azure.resourcemanager.eventgrid.implementation.NamespacesClientImpl$NamespacesService"],["com.azure.resourcemanager.eventgrid.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.eventgrid.implementation.PartnerConfigurationsClientImpl$PartnerConfigurationsService"],["com.azure.resourcemanager.eventgrid.implementation.PartnerNamespacesClientImpl$PartnerNamespacesService"],["com.azure.resourcemanager.eventgrid.implementation.PartnerRegistrationsClientImpl$PartnerRegistrationsService"],["com.azure.resourcemanager.eventgrid.implementation.PartnerTopicEventSubscriptionsClientImpl$PartnerTopicEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.PartnerTopicsClientImpl$PartnerTopicsService"],["com.azure.resourcemanager.eventgrid.implementation.PermissionBindingsClientImpl$PermissionBindingsService"],["com.azure.resourcemanager.eventgrid.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.eventgrid.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.eventgrid.implementation.SystemTopicEventSubscriptionsClientImpl$SystemTopicEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.SystemTopicsClientImpl$SystemTopicsService"],["com.azure.resourcemanager.eventgrid.implementation.TopicEventSubscriptionsClientImpl$TopicEventSubscriptionsService"],["com.azure.resourcemanager.eventgrid.implementation.TopicSpacesClientImpl$TopicSpacesService"],["com.azure.resourcemanager.eventgrid.implementation.TopicTypesClientImpl$TopicTypesService"],["com.azure.resourcemanager.eventgrid.implementation.TopicsClientImpl$TopicsService"],["com.azure.resourcemanager.eventgrid.implementation.VerifiedPartnersClientImpl$VerifiedPartnersService"]] \ No newline at end of file diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesCreateOrUpdateSamples.java index c018ec849020..36cb6101bfd1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesCreateOrUpdateSamples.java @@ -9,8 +9,7 @@ */ public final class CaCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * CaCertificates_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesDeleteSamples.java index 6090b3e0bf97..5b2e0e833359 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesDeleteSamples.java @@ -10,8 +10,8 @@ public final class CaCertificatesDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * CaCertificates_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_Delete. + * json */ /** * Sample code: CaCertificates_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesGetSamples.java index 80077a67c71e..208225b93d00 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesGetSamples.java @@ -10,8 +10,7 @@ public final class CaCertificatesGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * CaCertificates_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/CaCertificates_Get.json */ /** * Sample code: CaCertificates_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesListByNamespaceSamples.java index 7ecabfa8c798..32a1c5545d89 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesListByNamespaceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesListByNamespaceSamples.java @@ -9,8 +9,7 @@ */ public final class CaCertificatesListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * CaCertificates_ListByNamespace.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateSamples.java index 31e3bfb1ed40..e2b0b76457e3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateSamples.java @@ -14,8 +14,8 @@ public final class ChannelsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Channels_CreateOrUpdate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_CreateOrUpdate. + * json */ /** * Sample code: Channels_CreateOrUpdate. @@ -27,7 +27,7 @@ public static void channelsCreateOrUpdate(com.azure.resourcemanager.eventgrid.Ev .define("exampleChannelName1") .withExistingPartnerNamespace("examplerg", "examplePartnerNamespaceName1") .withChannelType(ChannelType.PARTNER_TOPIC) - .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("8f6b6269-84f2-4d09-9e31-1127efcd1e40") + .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("5b4b650e-28b9-4790-b3ab-ddbd88d727c4") .withResourceGroupName("examplerg2") .withName("examplePartnerTopic1") .withSource("ContosoCorp.Accounts.User1")) diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteSamples.java index 00745d8cc1c5..a979280d0162 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteSamples.java @@ -10,8 +10,7 @@ public final class ChannelsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Delete. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Delete.json */ /** * Sample code: Channels_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlSamples.java index 21d07bcf7d0c..0c32ffdcd1c5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlSamples.java @@ -10,8 +10,7 @@ public final class ChannelsGetFullUrlSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Channels_GetFullUrl.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_GetFullUrl.json */ /** * Sample code: Channels_GetFullUrl. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetSamples.java index 046e2f927884..0dffd769ff44 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetSamples.java @@ -10,8 +10,7 @@ public final class ChannelsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Get. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Get.json */ /** * Sample code: Channels_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceSamples.java index ff82ad3ac2d8..c38b77fdb096 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceSamples.java @@ -9,8 +9,7 @@ */ public final class ChannelsListByPartnerNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Channels_ListByPartnerNamespace.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateSamples.java index de67386fcc4b..0e354b603a96 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateSamples.java @@ -13,8 +13,7 @@ public final class ChannelsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Update. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Channels_Update.json */ /** * Sample code: Channels_Update. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsCreateOrUpdateSamples.java index a13da97dd268..f68766310c4f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsCreateOrUpdateSamples.java @@ -9,8 +9,7 @@ */ public final class ClientGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * ClientGroups_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsDeleteSamples.java index 8a8638bbb1fa..82db27c76ade 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsDeleteSamples.java @@ -10,8 +10,7 @@ public final class ClientGroupsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * ClientGroups_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_Delete.json */ /** * Sample code: ClientGroups_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsGetSamples.java index 3d4566ff6f4a..4d0bd061dd31 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsGetSamples.java @@ -10,8 +10,7 @@ public final class ClientGroupsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_Get - * .json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ClientGroups_Get.json */ /** * Sample code: ClientGroups_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListByNamespaceSamples.java index 39b9cc35c0c4..30d629da4a79 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListByNamespaceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListByNamespaceSamples.java @@ -9,8 +9,7 @@ */ public final class ClientGroupsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * ClientGroups_ListByNamespace.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsCreateOrUpdateSamples.java index ffc61b89a9ab..26137831aeef 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsCreateOrUpdateSamples.java @@ -19,8 +19,8 @@ public final class ClientsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Clients_CreateOrUpdate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_CreateOrUpdate. + * json */ /** * Sample code: Clients_CreateOrUpdate. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsDeleteSamples.java index 429c3977a296..eb96f7277dab 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsDeleteSamples.java @@ -10,8 +10,7 @@ public final class ClientsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_Delete. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_Delete.json */ /** * Sample code: Clients_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsGetSamples.java index bfcbeaea8c38..b6813ac34405 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsGetSamples.java @@ -10,7 +10,7 @@ public final class ClientsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_Get.json */ /** * Sample code: Clients_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsListByNamespaceSamples.java index 30201f500170..a09cc4158f66 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsListByNamespaceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsListByNamespaceSamples.java @@ -10,8 +10,8 @@ public final class ClientsListByNamespaceSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Clients_ListByNamespace.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Clients_ListByNamespace. + * json */ /** * Sample code: Clients_ListByNamespace. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsCreateOrUpdateSamples.java index 1e30fdc730a4..886241040d41 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsCreateOrUpdateSamples.java @@ -13,8 +13,7 @@ */ public final class DomainEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteSamples.java index 623f3d4dc18f..514b47d77f46 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class DomainEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_Delete.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesSamples.java index 060b9a5851ea..8348a2ba38f5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesSamples.java @@ -9,8 +9,7 @@ */ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_GetDeliveryAttributes.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlSamples.java index 24aa6cea4b95..39fcedf0dae9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlSamples.java @@ -9,8 +9,7 @@ */ public final class DomainEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_GetFullUrl.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetSamples.java index 0fa7396a583b..4071a5650a91 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetSamples.java @@ -9,8 +9,7 @@ */ public final class DomainEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_Get.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsListSamples.java index 303677d1f033..96d0d7040a7a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsListSamples.java @@ -9,8 +9,7 @@ */ public final class DomainEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_List.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsUpdateSamples.java index 2082d50e726b..2d77cdc72cff 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsUpdateSamples.java @@ -14,8 +14,7 @@ */ public final class DomainEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainEventSubscriptions_Update.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsCreateOrUpdateSamples.java index 7321ef27c5a6..f02b7427e2ac 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsCreateOrUpdateSamples.java @@ -13,8 +13,7 @@ */ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteSamples.java index b71c9ed6a1ca..5bfa68a94a81 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class DomainTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_Delete.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesSamples.java index ec86e6b0ed25..48cd2c588e1b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesSamples.java @@ -9,8 +9,7 @@ */ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_GetDeliveryAttributes.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlSamples.java index c6fe9a2d73f9..6a7b6c4fcb1e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlSamples.java @@ -9,8 +9,7 @@ */ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_GetFullUrl.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetSamples.java index 5869f5cf3f42..89e5f63c803e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetSamples.java @@ -9,8 +9,7 @@ */ public final class DomainTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_Get.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsListSamples.java index 0b927e01c7eb..e08f03401ee2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsListSamples.java @@ -9,8 +9,7 @@ */ public final class DomainTopicEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_List.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsUpdateSamples.java index 1cb22032b498..d41865f9c0ac 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsUpdateSamples.java @@ -14,8 +14,7 @@ */ public final class DomainTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopicEventSubscriptions_Update.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsCreateOrUpdateSamples.java index a63a49e69c2b..225c6f189e15 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsCreateOrUpdateSamples.java @@ -9,8 +9,7 @@ */ public final class DomainTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * DomainTopics_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteSamples.java index 3952b779608b..a000f0af5b4f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteSamples.java @@ -10,8 +10,7 @@ public final class DomainTopicsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * DomainTopics_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_Delete.json */ /** * Sample code: DomainTopics_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetSamples.java index c5c968c3f1d5..f7f97d27f034 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetSamples.java @@ -10,8 +10,7 @@ public final class DomainTopicsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_Get - * .json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_Get.json */ /** * Sample code: DomainTopics_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainSamples.java index 118ffb7ce7fc..6acf0a5475e1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainSamples.java @@ -10,8 +10,8 @@ public final class DomainTopicsListByDomainSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * DomainTopics_ListByDomain.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopics_ListByDomain + * .json */ /** * Sample code: DomainTopics_ListByDomain. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsCreateOrUpdateSamples.java index 1375d728c012..d8aae3fc4bea 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsCreateOrUpdateSamples.java @@ -17,8 +17,8 @@ public final class DomainsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Domains_CreateOrUpdate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_CreateOrUpdate. + * json */ /** * Sample code: Domains_CreateOrUpdate. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteSamples.java index 4c38e1271011..1cc2fd66e7c5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteSamples.java @@ -10,8 +10,7 @@ public final class DomainsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Delete. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Delete.json */ /** * Sample code: Domains_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupSamples.java index 6e9d430f5b13..be64cbc5adbb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class DomainsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Get.json */ /** * Sample code: Domains_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupSamples.java index 6dc2c26a838c..db482122d01e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class DomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Domains_ListByResourceGroup.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSamples.java index d7e1045defe1..f59941657f22 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSamples.java @@ -9,8 +9,7 @@ */ public final class DomainsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Domains_ListBySubscription.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSharedAccessKeysSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSharedAccessKeysSamples.java index 472b6e69425b..0fa2264f1218 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSharedAccessKeysSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSharedAccessKeysSamples.java @@ -9,8 +9,7 @@ */ public final class DomainsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Domains_ListSharedAccessKeys.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsRegenerateKeySamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsRegenerateKeySamples.java index 6b243e459a95..cd431e9cc8f9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsRegenerateKeySamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsRegenerateKeySamples.java @@ -12,8 +12,8 @@ public final class DomainsRegenerateKeySamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Domains_RegenerateKey.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_RegenerateKey. + * json */ /** * Sample code: Domains_RegenerateKey. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsUpdateSamples.java index 4c6e9e26f1af..b401065e6afb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsUpdateSamples.java @@ -18,8 +18,7 @@ public final class DomainsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Update. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Domains_Update.json */ /** * Sample code: Domains_Update. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsCreateOrUpdateSamples.java index 61f8636b41a7..5204f6065f9f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsCreateOrUpdateSamples.java @@ -20,8 +20,7 @@ */ public final class EventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json */ /** @@ -33,10 +32,10 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestinat com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", - new EventSubscriptionInner().withDestination(new EventHubEventSubscriptionDestination().withResourceId( - "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1")) + new EventSubscriptionInner().withDestination(new WebhookEventSubscriptionDestination().withEndpointUrl( + "https://azurefunctionexample.azurewebsites.net/runtime/webhooks/EventGrid?functionName=EventGridTrigger1&code=PASSWORDCODE")) .withFilter(new EventSubscriptionFilter().withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), @@ -44,8 +43,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForSubscription.json */ /** @@ -56,7 +54,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestinat public static void eventSubscriptionsCreateOrUpdateForSubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .createOrUpdate("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", + .createOrUpdate("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", new EventSubscriptionInner() .withDestination( new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) @@ -65,8 +63,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json */ /** @@ -78,7 +75,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination(new ServiceBusTopicEventSubscriptionDestination().withResourceId( @@ -93,8 +90,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForResource.json */ /** @@ -106,7 +102,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic eventSubscriptionsCreateOrUpdateForResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription10", new EventSubscriptionInner() .withDestination( @@ -118,8 +114,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic.json */ /** @@ -131,7 +126,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic eventSubscriptionsCreateOrUpdateForCustomTopic(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner().withDestination(new EventHubEventSubscriptionDestination().withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1")) @@ -142,8 +137,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForResourceGroup.json */ /** @@ -154,7 +148,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic public static void eventSubscriptionsCreateOrUpdateForResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .createOrUpdate("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", + .createOrUpdate("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", "examplesubscription2", new EventSubscriptionInner() .withDestination( @@ -166,8 +160,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json */ /** @@ -179,7 +172,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestina com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner().withDestination(new EventHubEventSubscriptionDestination().withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1")) @@ -193,8 +186,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestina } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json */ /** @@ -206,13 +198,12 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDes com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination(new StorageQueueEventSubscriptionDestination().withResourceId( "/subscriptions/d33c5f7a-02ea-40f4-bf52-07f17e84d6a8/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") - .withQueueName("queue1") - .withQueueMessageTimeToLiveInSeconds(300L)) + .withQueueName("queue1")) .withFilter(new EventSubscriptionFilter().withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)) @@ -223,8 +214,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDes } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json */ /** @@ -236,7 +226,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDe com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination(new AzureFunctionEventSubscriptionDestination().withResourceId( @@ -251,8 +241,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDe } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json */ /** @@ -264,7 +253,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectio com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination(new HybridConnectionEventSubscriptionDestination().withResourceId( @@ -279,8 +268,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectio } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json */ /** @@ -292,7 +280,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusQueue com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .createOrUpdate( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination(new ServiceBusQueueEventSubscriptionDestination().withResourceId( diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteSamples.java index 485fe9919cfd..c04a5a3b7cb6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_DeleteForCustomTopic.json */ /** @@ -22,13 +21,12 @@ public final class EventSubscriptionsDeleteSamples { eventSubscriptionsDeleteForCustomTopic(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .delete( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_DeleteForResourceGroup.json */ /** @@ -39,13 +37,12 @@ public final class EventSubscriptionsDeleteSamples { public static void eventSubscriptionsDeleteForResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .delete("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", + .delete("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", "examplesubscription2", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_DeleteForSubscription.json */ /** @@ -56,13 +53,12 @@ public final class EventSubscriptionsDeleteSamples { public static void eventSubscriptionsDeleteForSubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .delete("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", + .delete("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_DeleteForResource.json */ /** @@ -74,7 +70,7 @@ public final class EventSubscriptionsDeleteSamples { eventSubscriptionsDeleteForResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .delete( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription10", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesSamples.java index 732e577bcef7..6880890d899c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetDeliveryAttributes.json */ /** @@ -21,8 +20,7 @@ public final class EventSubscriptionsGetDeliveryAttributesSamples { public static void eventSubscriptionsGetDeliveryAttributes(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .getDeliveryAttributesWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", - "examplesubscription1", com.azure.core.util.Context.NONE); + .getDeliveryAttributesWithResponse("aaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaa", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlSamples.java index 8c1243c450d5..72b70fab6933 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetFullUrlForResource.json */ /** @@ -22,13 +21,12 @@ public final class EventSubscriptionsGetFullUrlSamples { eventSubscriptionsGetFullUrlForResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetFullUrlForResourceGroup.json */ /** @@ -39,13 +37,12 @@ public final class EventSubscriptionsGetFullUrlSamples { public static void eventSubscriptionsGetFullUrlForResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .getFullUrlWithResponse("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", + .getFullUrlWithResponse("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", "examplesubscription2", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetFullUrlForSubscription.json */ /** @@ -56,13 +53,12 @@ public final class EventSubscriptionsGetFullUrlSamples { public static void eventSubscriptionsGetFullUrlForSubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .getFullUrlWithResponse("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", + .getFullUrlWithResponse("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetFullUrlForCustomTopic.json */ /** @@ -74,7 +70,7 @@ public final class EventSubscriptionsGetFullUrlSamples { eventSubscriptionsGetFullUrlForCustomTopic(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetSamples.java index 7700c6be782b..5de19bcb921b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json */ /** @@ -22,13 +21,12 @@ public static void eventSubscriptionsGetForCustomTopicHybridConnectionDestinatio com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json */ /** @@ -40,13 +38,12 @@ public static void eventSubscriptionsGetForCustomTopicServiceBusTopicDestination com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForResourceGroup.json */ /** @@ -57,13 +54,12 @@ public static void eventSubscriptionsGetForCustomTopicServiceBusTopicDestination public static void eventSubscriptionsGetForResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .getWithResponse("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", + .getWithResponse("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", "examplesubscription2", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_EventHubDestination.json */ /** @@ -75,13 +71,12 @@ public static void eventSubscriptionsGetForCustomTopicEventHubDestination( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForSubscription.json */ /** @@ -92,13 +87,12 @@ public static void eventSubscriptionsGetForCustomTopicEventHubDestination( public static void eventSubscriptionsGetForSubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .getWithResponse("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", + .getWithResponse("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_WebhookDestination.json */ /** @@ -110,13 +104,12 @@ public static void eventSubscriptionsGetForCustomTopicWebhookDestination( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json */ /** @@ -128,13 +121,12 @@ public static void eventSubscriptionsGetForCustomTopicAzureFunctionDestination( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic.json */ /** @@ -146,13 +138,12 @@ public static void eventSubscriptionsGetForCustomTopicAzureFunctionDestination( eventSubscriptionsGetForCustomTopic(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json */ /** @@ -164,13 +155,12 @@ public static void eventSubscriptionsGetForCustomTopicStorageQueueDestination( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForResource.json */ /** @@ -181,13 +171,12 @@ public static void eventSubscriptionsGetForCustomTopicStorageQueueDestination( public static void eventSubscriptionsGetForResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json */ /** @@ -199,7 +188,7 @@ public static void eventSubscriptionsGetForCustomTopicServiceBusQueueDestination com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByDomainTopicSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByDomainTopicSamples.java index 47c1acc89054..a501d5762f2c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByDomainTopicSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByDomainTopicSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsListByDomainTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListByDomainTopic.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceGroupSamples.java index 0ab6257ddffb..db356f94e79c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListGlobalByResourceGroup.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceSamples.java index 164c5a765232..629c7e17d997 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListByResource.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples.java index fe65c21163f0..c58ad26c4fec 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListGlobalByResourceGroupForTopicType.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples.java index 54ae5f385721..78cba0c3df70 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListGlobalBySubscriptionForTopicType.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples.java index 5df046c37e60..4b6191d9f90d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListRegionalByResourceGroupForTopicType.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupSamples.java index 49a3a1ceca0c..195255efd9f3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsListRegionalByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListRegionalByResourceGroup.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples.java index be35806ae78d..5b73fb144c32 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListRegionalBySubscriptionForTopicType.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionSamples.java index bd754bf526f2..4d9cea3bc488 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsListRegionalBySubscriptionSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListRegionalBySubscription.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListSamples.java index 5116000f5bf2..0b72266ccea5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListSamples.java @@ -9,8 +9,7 @@ */ public final class EventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_ListGlobalBySubscription.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsUpdateSamples.java index c5f02dd73531..5036465007bc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsUpdateSamples.java @@ -21,8 +21,7 @@ */ public final class EventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json */ /** @@ -34,7 +33,7 @@ public static void eventSubscriptionsUpdateForCustomTopicEventHubDestination( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new EventHubEventSubscriptionDestination().withResourceId( @@ -47,8 +46,7 @@ public static void eventSubscriptionsUpdateForCustomTopicEventHubDestination( } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json */ /** @@ -60,7 +58,7 @@ public static void eventSubscriptionsUpdateForCustomTopicAzureFunctionDestinatio com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new AzureFunctionEventSubscriptionDestination().withResourceId( @@ -75,8 +73,7 @@ public static void eventSubscriptionsUpdateForCustomTopicAzureFunctionDestinatio } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json */ /** @@ -88,7 +85,7 @@ public static void eventSubscriptionsUpdateForCustomTopicWebhookDestination( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -101,8 +98,7 @@ public static void eventSubscriptionsUpdateForCustomTopicWebhookDestination( } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json */ /** @@ -114,7 +110,7 @@ public static void eventSubscriptionsUpdateForCustomTopicStorageQueueDestination com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new StorageQueueEventSubscriptionDestination().withResourceId( @@ -131,8 +127,7 @@ public static void eventSubscriptionsUpdateForCustomTopicStorageQueueDestination } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json */ /** @@ -144,7 +139,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestinat com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new ServiceBusTopicEventSubscriptionDestination().withResourceId( @@ -157,8 +152,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json */ /** @@ -170,7 +164,7 @@ public static void eventSubscriptionsUpdateForCustomTopicHybridConnectionDestina com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new HybridConnectionEventSubscriptionDestination().withResourceId( @@ -183,8 +177,7 @@ public static void eventSubscriptionsUpdateForCustomTopicHybridConnectionDestina } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json */ /** @@ -196,7 +189,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination(new ServiceBusQueueEventSubscriptionDestination().withResourceId( @@ -211,8 +204,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForCustomTopic.json */ /** @@ -224,7 +216,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat eventSubscriptionsUpdateForCustomTopic(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -237,8 +229,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForResource.json */ /** @@ -250,7 +241,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat eventSubscriptionsUpdateForResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() .update( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -263,8 +254,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForResourceGroup.json */ /** @@ -275,7 +265,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat public static void eventSubscriptionsUpdateForResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .update("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", + .update("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", "examplesubscription2", new EventSubscriptionUpdateParameters() .withDestination(new EventHubEventSubscriptionDestination().withResourceId( @@ -288,8 +278,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * EventSubscriptions_UpdateForSubscription.json */ /** @@ -300,7 +289,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat public static void eventSubscriptionsUpdateForSubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.eventSubscriptions() - .update("subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", + .update("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", new EventSubscriptionUpdateParameters() .withDestination( new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetSamples.java index 219d6c303910..214a6adaa6de 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetSamples.java @@ -10,8 +10,7 @@ public final class ExtensionTopicsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * ExtensionTopics_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ExtensionTopics_Get.json */ /** * Sample code: ExtensionTopics_Get. @@ -21,7 +20,7 @@ public final class ExtensionTopicsGetSamples { public static void extensionTopicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.extensionTopics() .getWithResponse( - "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default", + "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsCreateOrUpdateSamples.java index 62d155bb6854..53a5cf8e42ee 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsCreateOrUpdateSamples.java @@ -15,8 +15,7 @@ */ public final class NamespaceTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsDeleteSamples.java index da17a77501b1..732623c6d215 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class NamespaceTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_Delete.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples.java index aa4f335159c7..748a4e7d7917 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples.java @@ -9,8 +9,7 @@ */ public final class NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetFullUrlSamples.java index 21cfa833136e..7cc8542577ad 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetFullUrlSamples.java @@ -9,8 +9,7 @@ */ public final class NamespaceTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_GetFullUrl.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetSamples.java index 02999dc48212..e3d4f33d091f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetSamples.java @@ -9,8 +9,7 @@ */ public final class NamespaceTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_Get.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples.java index 8bbe0b39eb1f..c9f2f78cfb4f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples.java @@ -9,8 +9,7 @@ */ public final class NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsUpdateSamples.java index 31f13de38acc..f8110c0f9adf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsUpdateSamples.java @@ -16,8 +16,7 @@ */ public final class NamespaceTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopicEventSubscriptions_Update.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsCreateOrUpdateSamples.java index d509d9a4f3dd..d8d899e2a03e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsCreateOrUpdateSamples.java @@ -12,8 +12,7 @@ */ public final class NamespaceTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopics_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsDeleteSamples.java index 38163f55a9fb..c64652cd6a91 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsDeleteSamples.java @@ -10,8 +10,8 @@ public final class NamespaceTopicsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NamespaceTopics_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Delete. + * json */ /** * Sample code: NamespaceTopics_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsGetSamples.java index ade0df861670..c6c7e39b494c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsGetSamples.java @@ -10,8 +10,7 @@ public final class NamespaceTopicsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NamespaceTopics_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Get.json */ /** * Sample code: NamespaceTopics_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListByNamespaceSamples.java index bb96ba2ff87a..737bca3adb72 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListByNamespaceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListByNamespaceSamples.java @@ -9,8 +9,7 @@ */ public final class NamespaceTopicsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopics_ListByNamespace.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListSharedAccessKeysSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListSharedAccessKeysSamples.java index 104a1a4653e4..2a59d814fbdb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListSharedAccessKeysSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListSharedAccessKeysSamples.java @@ -9,8 +9,7 @@ */ public final class NamespaceTopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopics_ListSharedAccessKeys.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsRegenerateKeySamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsRegenerateKeySamples.java index fcd43cf46a6f..348ca6d66f91 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsRegenerateKeySamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsRegenerateKeySamples.java @@ -11,8 +11,7 @@ */ public final class NamespaceTopicsRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * NamespaceTopics_RegenerateKey.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsUpdateSamples.java index f4fcf211c58b..f5e54d9babdc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsUpdateSamples.java @@ -12,8 +12,8 @@ public final class NamespaceTopicsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NamespaceTopics_Update.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/NamespaceTopics_Update. + * json */ /** * Sample code: NamespaceTopics_Update. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesCreateOrUpdateSamples.java index 4ebbbe5bac83..59017bf42314 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesCreateOrUpdateSamples.java @@ -15,8 +15,8 @@ public final class NamespacesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Namespaces_CreateOrUpdate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_CreateOrUpdate + * .json */ /** * Sample code: Namespaces_CreateOrUpdate. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesDeleteSamples.java index 364ad02d1191..55f7fa20ee42 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesDeleteSamples.java @@ -10,8 +10,7 @@ public final class NamespacesDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Namespaces_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Delete.json */ /** * Sample code: Namespaces_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesGetByResourceGroupSamples.java index e8a1529d27be..bab2f006f176 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesGetByResourceGroupSamples.java @@ -10,8 +10,7 @@ public final class NamespacesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_Get. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Get.json */ /** * Sample code: Namespaces_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListByResourceGroupSamples.java index bdaf7c5bd589..2bb0609771ff 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class NamespacesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Namespaces_ListByResourceGroup.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSamples.java index c5698f6a67aa..355c660a7acd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSamples.java @@ -9,8 +9,7 @@ */ public final class NamespacesListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Namespaces_ListBySubscription.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSharedAccessKeysSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSharedAccessKeysSamples.java index 560dd29fe771..512eaa4f59b4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSharedAccessKeysSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSharedAccessKeysSamples.java @@ -9,8 +9,7 @@ */ public final class NamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Namespaces_ListSharedAccessKeys.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesRegenerateKeySamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesRegenerateKeySamples.java index 945dd17bb7e6..df00f81ef26b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesRegenerateKeySamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesRegenerateKeySamples.java @@ -12,8 +12,8 @@ public final class NamespacesRegenerateKeySamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Namespaces_RegenerateKey.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_RegenerateKey. + * json */ /** * Sample code: Namespaces_RegenerateKey. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesUpdateSamples.java index cc4e9a5f5854..a10e089ac3c9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesUpdateSamples.java @@ -14,8 +14,7 @@ public final class NamespacesUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Namespaces_Update.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Namespaces_Update.json */ /** * Sample code: Namespaces_Update. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesValidateCustomDomainOwnershipSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesValidateCustomDomainOwnershipSamples.java index 7f0ef9a8edf6..92ea433c03a2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesValidateCustomDomainOwnershipSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesValidateCustomDomainOwnershipSamples.java @@ -9,8 +9,7 @@ */ public final class NamespacesValidateCustomDomainOwnershipSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Namespaces_ValidateCustomDomainOwnership.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java deleted file mode 100644 index a1fe221d8b5b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; - -/** - * Samples for NetworkSecurityPerimeterConfigurations Get. - */ -public final class NetworkSecurityPerimeterConfigurationsGetSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_Get.json - */ - /** - * Sample code: NetworkSecurityPerimeterConfigurations_Get. - * - * @param manager Entry point to EventGridManager. - */ - public static void - networkSecurityPerimeterConfigurationsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.networkSecurityPerimeterConfigurations() - .getWithResponse("examplerg", NetworkSecurityPerimeterResourceType.TOPICS, "exampleResourceName", - "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter", "someAssociation", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsListSamples.java deleted file mode 100644 index c94470e062df..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsListSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; - -/** - * Samples for NetworkSecurityPerimeterConfigurations List. - */ -public final class NetworkSecurityPerimeterConfigurationsListSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_List.json - */ - /** - * Sample code: NetworkSecurityPerimeterConfigurations_List. - * - * @param manager Entry point to EventGridManager. - */ - public static void - networkSecurityPerimeterConfigurationsList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.networkSecurityPerimeterConfigurations() - .list("examplerg", NetworkSecurityPerimeterResourceType.TOPICS, "exampleResourceName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java deleted file mode 100644 index 5a11eefb58d7..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; - -/** - * Samples for NetworkSecurityPerimeterConfigurations Reconcile. - */ -public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_Reconcile.json - */ - /** - * Sample code: NetworkSecurityPerimeterConfigurations_Reconcile. - * - * @param manager Entry point to EventGridManager. - */ - public static void - networkSecurityPerimeterConfigurationsReconcile(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.networkSecurityPerimeterConfigurations() - .reconcile("examplerg", NetworkSecurityPerimeterResourceType.TOPICS, "exampleResourceName", - "8f6b6269-84f2-4d09-9e31-1127efcd1e40perimeter", "someAssociation", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/OperationsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/OperationsListSamples.java index b298a8dc0698..7b17b8711bf5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/OperationsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/OperationsListSamples.java @@ -10,8 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Operations_List. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Operations_List.json */ /** * Sample code: Operations_List. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsAuthorizePartnerSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsAuthorizePartnerSamples.java index b69ae02dfe2d..0ff56adf34ba 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsAuthorizePartnerSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsAuthorizePartnerSamples.java @@ -13,8 +13,7 @@ */ public final class PartnerConfigurationsAuthorizePartnerSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_AuthorizePartner.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsCreateOrUpdateSamples.java index 9dd5422160b8..f46539dd328e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsCreateOrUpdateSamples.java @@ -16,8 +16,7 @@ */ public final class PartnerConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteSamples.java index 10d15eb91a45..a6910db17ca7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerConfigurationsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_Delete.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsGetByResourceGroupSamples.java index 2ee3a199f179..b55ffabc6a4a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsGetByResourceGroupSamples.java @@ -10,8 +10,8 @@ public final class PartnerConfigurationsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerConfigurations_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerConfigurations_Get + * .json */ /** * Sample code: PartnerConfigurations_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListByResourceGroupSamples.java index ec4d84dd5a30..6a3c2183aedf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerConfigurationsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_ListByResourceGroup.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListSamples.java index e71caea7f1ac..594119e46b5c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerConfigurationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_ListBySubscription.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUnauthorizePartnerSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUnauthorizePartnerSamples.java index dd1e44bc6447..7cdf79f6b88f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUnauthorizePartnerSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUnauthorizePartnerSamples.java @@ -13,8 +13,7 @@ */ public final class PartnerConfigurationsUnauthorizePartnerSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_UnauthorizePartner.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUpdateSamples.java index a4af5af6fb30..6bc66250abc4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUpdateSamples.java @@ -13,8 +13,7 @@ */ public final class PartnerConfigurationsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerConfigurations_Update.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsActivateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsActivateSamples.java deleted file mode 100644 index d7e0bc04765d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsActivateSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -/** - * Samples for PartnerDestinations Activate. - */ -public final class PartnerDestinationsActivateSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_Activate.json - */ - /** - * Sample code: PartnerDestinations_Activate. - * - * @param manager Entry point to EventGridManager. - */ - public static void partnerDestinationsActivate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations() - .activateWithResponse("examplerg", "examplePartnerDestination1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsCreateOrUpdateSamples.java deleted file mode 100644 index 2b352c437263..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsCreateOrUpdateSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import java.time.OffsetDateTime; -import java.util.UUID; - -/** - * Samples for PartnerDestinations CreateOrUpdate. - */ -public final class PartnerDestinationsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_CreateOrUpdate.json - */ - /** - * Sample code: PartnerDestinations_CreateOrUpdate. - * - * @param manager Entry point to EventGridManager. - */ - public static void partnerDestinationsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations() - .define("examplePartnerDestinationName1") - .withRegion("westus2") - .withExistingResourceGroup("examplerg") - .withPartnerRegistrationImmutableId(UUID.fromString("0bd70ee2-7d95-447e-ab1f-c4f320019404")) - .withEndpointServiceContext("This is an example") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2022-03-14T19:33:43.430Z")) - .withEndpointBaseUrl("https://www.example/endpoint") - .withMessageForActivation("Sample Activation message") - .create(); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsDeleteSamples.java deleted file mode 100644 index 5c9178cd24a3..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -/** - * Samples for PartnerDestinations Delete. - */ -public final class PartnerDestinationsDeleteSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_Delete.json - */ - /** - * Sample code: PartnerDestinations_Delete. - * - * @param manager Entry point to EventGridManager. - */ - public static void partnerDestinationsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations() - .delete("examplerg", "examplePartnerDestinationName1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsGetByResourceGroupSamples.java deleted file mode 100644 index 9689c7e72226..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsGetByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -/** - * Samples for PartnerDestinations GetByResourceGroup. - */ -public final class PartnerDestinationsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_Get.json - */ - /** - * Sample code: PartnerDestinations_Get. - * - * @param manager Entry point to EventGridManager. - */ - public static void partnerDestinationsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations() - .getByResourceGroupWithResponse("examplerg", "examplePartnerDestinationName1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListByResourceGroupSamples.java deleted file mode 100644 index 14442564b15e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -/** - * Samples for PartnerDestinations ListByResourceGroup. - */ -public final class PartnerDestinationsListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_ListByResourceGroup.json - */ - /** - * Sample code: PartnerDestinations_ListByResourceGroup. - * - * @param manager Entry point to EventGridManager. - */ - public static void - partnerDestinationsListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListSamples.java deleted file mode 100644 index 604f9c953589..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -/** - * Samples for PartnerDestinations List. - */ -public final class PartnerDestinationsListSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_ListBySubscription.json - */ - /** - * Sample code: PartnerDestinations_ListBySubscription. - * - * @param manager Entry point to EventGridManager. - */ - public static void - partnerDestinationsListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerDestinations().list(null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsUpdateSamples.java deleted file mode 100644 index c3001b17664c..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsUpdateSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.resourcemanager.eventgrid.models.PartnerDestination; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for PartnerDestinations Update. - */ -public final class PartnerDestinationsUpdateSamples { - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerDestinations_Update.json - */ - /** - * Sample code: PartnerDestinations_Update. - * - * @param manager Entry point to EventGridManager. - */ - public static void partnerDestinationsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - PartnerDestination resource = manager.partnerDestinations() - .getByResourceGroupWithResponse("examplerg", "examplePartnerDestinationName1", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesCreateOrUpdateSamples.java index c7a8bf64e878..110ffac28706 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesCreateOrUpdateSamples.java @@ -12,8 +12,7 @@ */ public final class PartnerNamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerNamespaces_CreateOrUpdate.json */ /** @@ -28,7 +27,7 @@ public static void partnerNamespacesCreateOrUpdate(com.azure.resourcemanager.eve .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withPartnerRegistrationFullyQualifiedId( - "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1") + "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1") .create(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteSamples.java index 7e5994470822..6b4e924ffe05 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteSamples.java @@ -10,8 +10,8 @@ public final class PartnerNamespacesDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerNamespaces_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Delete. + * json */ /** * Sample code: PartnerNamespaces_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupSamples.java index 26ae6657a81c..bd415715e73d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupSamples.java @@ -10,8 +10,8 @@ public final class PartnerNamespacesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerNamespaces_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Get. + * json */ /** * Sample code: PartnerNamespaces_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupSamples.java index 33b52fdc50b0..b84f1556bda5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerNamespacesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerNamespaces_ListByResourceGroup.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSamples.java index 45f8b45ea107..67ecc562f780 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerNamespacesListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerNamespaces_ListBySubscription.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSharedAccessKeysSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSharedAccessKeysSamples.java index 616a40a3f900..7dabd9efc393 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSharedAccessKeysSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSharedAccessKeysSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerNamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerNamespaces_ListSharedAccessKeys.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesRegenerateKeySamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesRegenerateKeySamples.java index dda3728aff8d..a0c3c8973743 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesRegenerateKeySamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesRegenerateKeySamples.java @@ -11,8 +11,7 @@ */ public final class PartnerNamespacesRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerNamespaces_RegenerateKey.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesUpdateSamples.java index d9ff3a00ba78..fee4b4a23889 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesUpdateSamples.java @@ -14,8 +14,8 @@ public final class PartnerNamespacesUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerNamespaces_Update.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerNamespaces_Update. + * json */ /** * Sample code: PartnerNamespaces_Update. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateSamples.java index 93e547dc433d..8d78af1ce5c8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateSamples.java @@ -12,8 +12,7 @@ */ public final class PartnerRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerRegistrations_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteSamples.java index d1b943e4939b..880eafecdd80 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerRegistrationsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerRegistrations_Delete.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupSamples.java index 18fd80c137a3..18635caeaac0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupSamples.java @@ -10,8 +10,8 @@ public final class PartnerRegistrationsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerRegistrations_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerRegistrations_Get. + * json */ /** * Sample code: PartnerRegistrations_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupSamples.java index c2b6e64a1176..8e00e3f78342 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerRegistrationsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerRegistrations_ListByResourceGroup.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListSamples.java index ef29ad278bc6..22dae9e65baf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerRegistrationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerRegistrations_ListBySubscription.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsUpdateSamples.java index 8bfbb1fa290b..3ac2694ae8cd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsUpdateSamples.java @@ -13,8 +13,7 @@ */ public final class PartnerRegistrationsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerRegistrations_Update.json */ /** @@ -27,7 +26,7 @@ public static void partnerRegistrationsUpdate(com.azure.resourcemanager.eventgri .getByResourceGroupWithResponse("examplerg", "examplePartnerRegistrationName1", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("NewKey", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } // Use "Map.of" if available diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsCreateOrUpdateSamples.java index 2e8f2aae316b..d2a809274198 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsCreateOrUpdateSamples.java @@ -13,8 +13,7 @@ */ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteSamples.java index 4c347a169da4..969b8822f4ec 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_Delete.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples.java index 8d67f0846291..33452be7fe54 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_GetDeliveryAttributes.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlSamples.java index 9869d9708129..fcde19b332c4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_GetFullUrl.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetSamples.java index 270000b3fd88..d2a67e1d7fb7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_Get.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsListByPartnerTopicSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsListByPartnerTopicSamples.java index 688c5aed6ec0..68e4657da03e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsListByPartnerTopicSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsListByPartnerTopicSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerTopicEventSubscriptionsListByPartnerTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_ListByPartnerTopic.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsUpdateSamples.java index 7efb8f62f372..02ed9d976ac6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsUpdateSamples.java @@ -14,8 +14,7 @@ */ public final class PartnerTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopicEventSubscriptions_Update.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateSamples.java index cac321a908ef..276a200e55c5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateSamples.java @@ -10,8 +10,8 @@ public final class PartnerTopicsActivateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerTopics_Activate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Activate. + * json */ /** * Sample code: PartnerTopics_Activate. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateSamples.java index ba5a296af849..34c4ce11a29a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateSamples.java @@ -12,8 +12,7 @@ */ public final class PartnerTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopics_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateSamples.java index 7bf908bf34a5..a17843c7d144 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateSamples.java @@ -10,8 +10,8 @@ public final class PartnerTopicsDeactivateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerTopics_Deactivate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Deactivate. + * json */ /** * Sample code: PartnerTopics_Deactivate. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteSamples.java index ed5d7554ce8c..4884ab52d29b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteSamples.java @@ -10,8 +10,7 @@ public final class PartnerTopicsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerTopics_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Delete.json */ /** * Sample code: PartnerTopics_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupSamples.java index e380f1290153..ce0874e209cb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupSamples.java @@ -10,8 +10,7 @@ public final class PartnerTopicsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerTopics_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Get.json */ /** * Sample code: PartnerTopics_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupSamples.java index b5a39b8c7eb6..37abc7456355 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerTopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopics_ListByResourceGroup.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListSamples.java index f2ff5c45eb9a..3701a10c9b27 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListSamples.java @@ -9,8 +9,7 @@ */ public final class PartnerTopicsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PartnerTopics_ListBySubscription.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsUpdateSamples.java index 31673b9bcd0c..f1d70aee9abb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsUpdateSamples.java @@ -14,8 +14,7 @@ public final class PartnerTopicsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PartnerTopics_Update.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PartnerTopics_Update.json */ /** * Sample code: PartnerTopics_Update. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsCreateOrUpdateSamples.java index 48fbfd3e0f4c..ff4ea4ae0c61 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsCreateOrUpdateSamples.java @@ -11,8 +11,7 @@ */ public final class PermissionBindingsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PermissionBindings_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsDeleteSamples.java index 86ab0184e7d7..973433ebda9a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsDeleteSamples.java @@ -10,8 +10,8 @@ public final class PermissionBindingsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PermissionBindings_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_Delete + * .json */ /** * Sample code: PermissionBindings_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsGetSamples.java index 3dcbbbf45d11..8e02f9e1d981 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsGetSamples.java @@ -10,8 +10,8 @@ public final class PermissionBindingsGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PermissionBindings_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PermissionBindings_Get. + * json */ /** * Sample code: PermissionBindings_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListByNamespaceSamples.java index bf12ba1ac186..25fa4280645e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListByNamespaceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListByNamespaceSamples.java @@ -9,8 +9,7 @@ */ public final class PermissionBindingsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PermissionBindings_ListByNamespace.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsDeleteSamples.java index 65f91c95c6a0..33ff5cf561c4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -11,8 +11,7 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PrivateEndpointConnections_Delete.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetSamples.java index 6a3bcc29f077..860baf2e0dc9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetSamples.java @@ -11,8 +11,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PrivateEndpointConnections_Get.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceSamples.java index 60fe96f6bbed..de3ca1f817f5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceSamples.java @@ -11,8 +11,7 @@ */ public final class PrivateEndpointConnectionsListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PrivateEndpointConnections_ListByResource.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateSamples.java index 3b7a43dc51dc..6be6897d7dca 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateSamples.java @@ -14,8 +14,7 @@ */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PrivateEndpointConnections_Update.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetSamples.java index 675c9adf49a9..b6a4b7de6212 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetSamples.java @@ -10,8 +10,8 @@ public final class PrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * PrivateLinkResources_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/PrivateLinkResources_Get. + * json */ /** * Sample code: PrivateLinkResources_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceSamples.java index b895ac2a360d..770bc59e5099 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceSamples.java @@ -9,8 +9,7 @@ */ public final class PrivateLinkResourcesListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * PrivateLinkResources_ListByResource.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsCreateOrUpdateSamples.java index ebdcdd9d87e2..7e641863b914 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsCreateOrUpdateSamples.java @@ -13,8 +13,7 @@ */ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteSamples.java index bf1485ec4867..e306ed3b4787 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class SystemTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_Delete.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesSamples.java index e0ecb32033d0..3e4a47eff765 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesSamples.java @@ -9,8 +9,7 @@ */ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_GetDeliveryAttributes.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlSamples.java index 1a07a47798ca..56d8b9cb91b0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlSamples.java @@ -9,8 +9,7 @@ */ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_GetFullUrl.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetSamples.java index 86de2ff6b4da..6187eb999f52 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetSamples.java @@ -9,8 +9,7 @@ */ public final class SystemTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_Get.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsListBySystemTopicSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsListBySystemTopicSamples.java index 64d240a7e37c..af55b265fffb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsListBySystemTopicSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsListBySystemTopicSamples.java @@ -9,8 +9,7 @@ */ public final class SystemTopicEventSubscriptionsListBySystemTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_ListBySystemTopic.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsUpdateSamples.java index 559025752a13..6d5345352938 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsUpdateSamples.java @@ -14,8 +14,7 @@ */ public final class SystemTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopicEventSubscriptions_Update.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateSamples.java index 0028a45a4d0a..22f8478f09d8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateSamples.java @@ -12,8 +12,7 @@ */ public final class SystemTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopics_CreateOrUpdate.json */ /** @@ -28,7 +27,7 @@ public static void systemTopicsCreateOrUpdate(com.azure.resourcemanager.eventgri .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withSource( - "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e") + "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e") .withTopicType("microsoft.storage.storageaccounts") .create(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteSamples.java index c9854e3467b1..b97d00cd0a3c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteSamples.java @@ -10,8 +10,7 @@ public final class SystemTopicsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * SystemTopics_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Delete.json */ /** * Sample code: SystemTopics_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupSamples.java index 8a555aaefbb5..a5800038dd25 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupSamples.java @@ -10,8 +10,7 @@ public final class SystemTopicsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_Get - * .json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Get.json */ /** * Sample code: SystemTopics_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupSamples.java index 8f86a25b5f7f..4ebd4f527b7e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class SystemTopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopics_ListByResourceGroup.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListSamples.java index ec6fb4c10dc2..cb96cc3b477f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListSamples.java @@ -9,8 +9,7 @@ */ public final class SystemTopicsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * SystemTopics_ListBySubscription.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsUpdateSamples.java index 4eccb282d056..4d62f97a932c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsUpdateSamples.java @@ -14,8 +14,7 @@ public final class SystemTopicsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * SystemTopics_Update.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/SystemTopics_Update.json */ /** * Sample code: SystemTopics_Update. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsCreateOrUpdateSamples.java index 62def6ce6fa1..b65233bf6bef 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsCreateOrUpdateSamples.java @@ -12,8 +12,7 @@ */ public final class TopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteSamples.java index facc6dfd5a30..08de60d57180 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class TopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_Delete.json */ /** @@ -20,6 +19,6 @@ public final class TopicEventSubscriptionsDeleteSamples { */ public static void topicEventSubscriptionsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.topicEventSubscriptions() - .delete("examplerg", "exampleTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); + .delete("examplerg", "exampleTopic", "examplesubscription", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesSamples.java index 334fff717a8a..0414e98ee707 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesSamples.java @@ -9,8 +9,7 @@ */ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_GetDeliveryAttributes.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlSamples.java index 0329d15ff62a..6d9b88d74d0d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlSamples.java @@ -9,8 +9,7 @@ */ public final class TopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_GetFullUrl.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetSamples.java index afca5f78b24b..b29a815cdbe7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetSamples.java @@ -9,8 +9,7 @@ */ public final class TopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_Get.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsListSamples.java index dc0b7240d96e..2b8d43955342 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsListSamples.java @@ -9,8 +9,7 @@ */ public final class TopicEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_List.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsUpdateSamples.java index eee4b43d8d55..b01e62b26ee7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsUpdateSamples.java @@ -14,8 +14,7 @@ */ public final class TopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicEventSubscriptions_Update.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesCreateOrUpdateSamples.java index 8b2b6ccf4b4f..ef3ddea32e67 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesCreateOrUpdateSamples.java @@ -11,8 +11,7 @@ */ public final class TopicSpacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicSpaces_CreateOrUpdate.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesDeleteSamples.java index 20e4fd515adc..6fb3385cbaf4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesDeleteSamples.java @@ -10,8 +10,7 @@ public final class TopicSpacesDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * TopicSpaces_Delete.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_Delete.json */ /** * Sample code: TopicSpaces_Delete. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesGetSamples.java index 92c2cbcce36a..ef09b0bfa680 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesGetSamples.java @@ -10,8 +10,7 @@ public final class TopicSpacesGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_Get. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicSpaces_Get.json */ /** * Sample code: TopicSpaces_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListByNamespaceSamples.java index 87e8e7afd591..4348665ad903 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListByNamespaceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListByNamespaceSamples.java @@ -9,8 +9,7 @@ */ public final class TopicSpacesListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * TopicSpaces_ListByNamespace.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetSamples.java index b5464585f0fc..e32c7ab1ebc0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetSamples.java @@ -10,8 +10,7 @@ public final class TopicTypesGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_Get. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_Get.json */ /** * Sample code: TopicTypes_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesSamples.java index 097794cb2908..3d9df1019598 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesSamples.java @@ -10,8 +10,8 @@ public final class TopicTypesListEventTypesSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * TopicTypes_ListEventTypes.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_ListEventTypes + * .json */ /** * Sample code: TopicTypes_ListEventTypes. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListSamples.java index 13ac8cd8f8ac..ea4364197fef 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListSamples.java @@ -10,8 +10,7 @@ public final class TopicTypesListSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_List. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/TopicTypes_List.json */ /** * Sample code: TopicTypes_List. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsCreateOrUpdateSamples.java index 3e6aa59afdbb..3ee26656fd23 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsCreateOrUpdateSamples.java @@ -4,12 +4,9 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.IpActionType; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceKind; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -20,8 +17,8 @@ public final class TopicsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Topics_CreateOrUpdate.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_CreateOrUpdate. + * json */ /** * Sample code: Topics_CreateOrUpdate. @@ -41,30 +38,6 @@ public static void topicsCreateOrUpdate(com.azure.resourcemanager.eventgrid.Even .create(); } - /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Topics_CreateOrUpdateForAzureArc.json - */ - /** - * Sample code: Topics_CreateOrUpdateForAzureArc. - * - * @param manager Entry point to EventGridManager. - */ - public static void topicsCreateOrUpdateForAzureArc(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics() - .define("exampletopic1") - .withRegion("westus2") - .withExistingResourceGroup("examplerg") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withKind(ResourceKind.AZURE_ARC) - .withExtendedLocation(new ExtendedLocation().withName( - "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourcegroups/examplerg/providers/Microsoft.ExtendedLocation/CustomLocations/exampleCustomLocation") - .withType("CustomLocation")) - .withInputSchema(InputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .create(); - } - // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsDeleteSamples.java index bca12d217870..920994942c55 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsDeleteSamples.java @@ -10,8 +10,7 @@ public final class TopicsDeleteSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Delete. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Delete.json */ /** * Sample code: Topics_Delete. @@ -19,6 +18,6 @@ public final class TopicsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void topicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().delete("examplerg1", "exampletopic1", com.azure.core.util.Context.NONE); + manager.topics().delete("examplerg", "exampletopic", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupSamples.java index 4cf2a9144057..a13b460dfea2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class TopicsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Get.json */ /** * Sample code: Topics_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupSamples.java index 1c0bf0d6902b..3862fd85f34d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class TopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Topics_ListByResourceGroup.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesSamples.java index 9a3aa8809b0f..724cb15d76ac 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesSamples.java @@ -10,8 +10,8 @@ public final class TopicsListEventTypesSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Topics_ListEventTypes.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_ListEventTypes. + * json */ /** * Sample code: Topics_ListEventTypes. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSamples.java index a3f36acbe6f8..a67c2e32c83a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSamples.java @@ -10,8 +10,8 @@ public final class TopicsListSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Topics_ListBySubscription.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_ListBySubscription + * .json */ /** * Sample code: Topics_ListBySubscription. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSharedAccessKeysSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSharedAccessKeysSamples.java index f06537c2fc0f..e430ab5c7ff7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSharedAccessKeysSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSharedAccessKeysSamples.java @@ -9,8 +9,7 @@ */ public final class TopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/ * Topics_ListSharedAccessKeys.json */ /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsRegenerateKeySamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsRegenerateKeySamples.java index 7692f06aaa4a..9d978d5be215 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsRegenerateKeySamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsRegenerateKeySamples.java @@ -12,8 +12,7 @@ public final class TopicsRegenerateKeySamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * Topics_RegenerateKey.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_RegenerateKey.json */ /** * Sample code: Topics_RegenerateKey. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsUpdateSamples.java index cf83d00a44ca..35d52ab2ef99 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsUpdateSamples.java @@ -18,8 +18,7 @@ public final class TopicsUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Update. - * json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/Topics_Update.json */ /** * Sample code: Topics_Update. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetSamples.java index 8d8514cb6ff1..2c45efd0baaf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetSamples.java @@ -10,8 +10,7 @@ public final class VerifiedPartnersGetSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * VerifiedPartners_Get.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/VerifiedPartners_Get.json */ /** * Sample code: VerifiedPartners_Get. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListSamples.java index fd24b4aa7938..513dd66de033 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListSamples.java @@ -10,8 +10,8 @@ public final class VerifiedPartnersListSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ - * VerifiedPartners_List.json + * specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/VerifiedPartners_List. + * json */ /** * Sample code: VerifiedPartners_List. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureADPartnerClientAuthenticationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureADPartnerClientAuthenticationPropertiesTests.java deleted file mode 100644 index 5ea46b4f8043..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureADPartnerClientAuthenticationPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.AzureADPartnerClientAuthenticationProperties; -import org.junit.jupiter.api.Assertions; - -public final class AzureADPartnerClientAuthenticationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureADPartnerClientAuthenticationProperties model = BinaryData.fromString( - "{\"azureActiveDirectoryTenantId\":\"vmsxbaevwjcnkot\",\"azureActiveDirectoryApplicationIdOrUri\":\"wuhvaj\"}") - .toObject(AzureADPartnerClientAuthenticationProperties.class); - Assertions.assertEquals("vmsxbaevwjcnkot", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("wuhvaj", model.azureActiveDirectoryApplicationIdOrUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureADPartnerClientAuthenticationProperties model - = new AzureADPartnerClientAuthenticationProperties().withAzureActiveDirectoryTenantId("vmsxbaevwjcnkot") - .withAzureActiveDirectoryApplicationIdOrUri("wuhvaj"); - model = BinaryData.fromObject(model).toObject(AzureADPartnerClientAuthenticationProperties.class); - Assertions.assertEquals("vmsxbaevwjcnkot", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("wuhvaj", model.azureActiveDirectoryApplicationIdOrUri()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureADPartnerClientAuthenticationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureADPartnerClientAuthenticationTests.java deleted file mode 100644 index b42ae5129cad..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureADPartnerClientAuthenticationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.AzureADPartnerClientAuthentication; -import org.junit.jupiter.api.Assertions; - -public final class AzureADPartnerClientAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureADPartnerClientAuthentication model = BinaryData.fromString( - "{\"clientAuthenticationType\":\"AzureAD\",\"properties\":{\"azureActiveDirectoryTenantId\":\"lfemjj\",\"azureActiveDirectoryApplicationIdOrUri\":\"kzwjiqullq\"}}") - .toObject(AzureADPartnerClientAuthentication.class); - Assertions.assertEquals("lfemjj", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("kzwjiqullq", model.azureActiveDirectoryApplicationIdOrUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureADPartnerClientAuthentication model - = new AzureADPartnerClientAuthentication().withAzureActiveDirectoryTenantId("lfemjj") - .withAzureActiveDirectoryApplicationIdOrUri("kzwjiqullq"); - model = BinaryData.fromObject(model).toObject(AzureADPartnerClientAuthentication.class); - Assertions.assertEquals("lfemjj", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("kzwjiqullq", model.azureActiveDirectoryApplicationIdOrUri()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureFunctionEventSubscriptionDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureFunctionEventSubscriptionDestinationPropertiesTests.java deleted file mode 100644 index c92a6dc5eeb7..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureFunctionEventSubscriptionDestinationPropertiesTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.AzureFunctionEventSubscriptionDestinationProperties; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureFunctionEventSubscriptionDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureFunctionEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"ryqxzxa\",\"maxEventsPerBatch\":828201451,\"preferredBatchSizeInKilobytes\":355458719,\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"iymqr\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"guhfupe\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"svvoqsbpkflanfk\"}]}") - .toObject(AzureFunctionEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("ryqxzxa", model.resourceId()); - Assertions.assertEquals(828201451, model.maxEventsPerBatch()); - Assertions.assertEquals(355458719, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("iymqr", model.deliveryAttributeMappings().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureFunctionEventSubscriptionDestinationProperties model - = new AzureFunctionEventSubscriptionDestinationProperties().withResourceId("ryqxzxa") - .withMaxEventsPerBatch(828201451) - .withPreferredBatchSizeInKilobytes(355458719) - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("iymqr"), - new DeliveryAttributeMapping().withName("guhfupe"), - new DeliveryAttributeMapping().withName("svvoqsbpkflanfk"))); - model = BinaryData.fromObject(model).toObject(AzureFunctionEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("ryqxzxa", model.resourceId()); - Assertions.assertEquals(828201451, model.maxEventsPerBatch()); - Assertions.assertEquals(355458719, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("iymqr", model.deliveryAttributeMappings().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureFunctionEventSubscriptionDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureFunctionEventSubscriptionDestinationTests.java deleted file mode 100644 index f691bcce702d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureFunctionEventSubscriptionDestinationTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.AzureFunctionEventSubscriptionDestination; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureFunctionEventSubscriptionDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureFunctionEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"AzureFunction\",\"properties\":{\"resourceId\":\"yao\",\"maxEventsPerBatch\":1884688953,\"preferredBatchSizeInKilobytes\":292024569,\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"hdkcprgu\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"rztiochlutixmqr\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"jizcbfzmcrunfhiu\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"mfbcpaqktkrum\"}]}}") - .toObject(AzureFunctionEventSubscriptionDestination.class); - Assertions.assertEquals("yao", model.resourceId()); - Assertions.assertEquals(1884688953, model.maxEventsPerBatch()); - Assertions.assertEquals(292024569, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("hdkcprgu", model.deliveryAttributeMappings().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureFunctionEventSubscriptionDestination model - = new AzureFunctionEventSubscriptionDestination().withResourceId("yao") - .withMaxEventsPerBatch(1884688953) - .withPreferredBatchSizeInKilobytes(292024569) - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("hdkcprgu"), - new DeliveryAttributeMapping().withName("rztiochlutixmqr"), - new DeliveryAttributeMapping().withName("jizcbfzmcrunfhiu"), - new DeliveryAttributeMapping().withName("mfbcpaqktkrum"))); - model = BinaryData.fromObject(model).toObject(AzureFunctionEventSubscriptionDestination.class); - Assertions.assertEquals("yao", model.resourceId()); - Assertions.assertEquals(1884688953, model.maxEventsPerBatch()); - Assertions.assertEquals(292024569, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("hdkcprgu", model.deliveryAttributeMappings().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesDeleteMockTests.java deleted file mode 100644 index f696977498d5..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CaCertificatesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.caCertificates().delete("i", "ehqbeivdlhydwbdb", "grlpuny", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelInnerTests.java deleted file mode 100644 index efa0c1385fee..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelInnerTests.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ChannelInner; -import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; -import com.azure.resourcemanager.eventgrid.models.ChannelType; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; -import com.azure.resourcemanager.eventgrid.models.ReadinessState; -import com.azure.resourcemanager.eventgrid.models.ResourceMoveChangeHistory; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ChannelInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ChannelInner model = BinaryData.fromString( - "{\"properties\":{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"oizh\",\"resourceGroupName\":\"rxybqsoq\",\"name\":\"gkdmb\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"qes\":{\"description\":\"ufpdznrbtcqq\",\"displayName\":\"qglhq\",\"documentationUrl\":\"ufo\",\"dataSchemaUrl\":\"jywif\"}}},\"source\":\"gdf\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"zlhjxrifkwmrvkt\",\"resourceGroupName\":\"zntocipaouajps\",\"name\":\"cmpoyfdkfogkny\",\"endpointServiceContext\":\"ofjdde\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"eupewnwreitjz\",\"resourceGroupName\":\"lusarh\",\"changedTimeUtc\":\"2021-11-04T00:37:18Z\"}]},\"messageForActivation\":\"qhsmyurkdtml\",\"provisioningState\":\"Succeeded\",\"readinessState\":\"Activated\",\"expirationTimeIfNotActivatedUtc\":\"2021-01-05T18:43:06Z\"},\"id\":\"txukcdmp\",\"name\":\"rcryuanzwuxzdxta\",\"type\":\"rlhm\"}") - .toObject(ChannelInner.class); - Assertions.assertEquals(ChannelType.PARTNER_TOPIC, model.channelType()); - Assertions.assertEquals("oizh", model.partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("rxybqsoq", model.partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("gkdmb", model.partnerTopicInfo().name()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("ufpdznrbtcqq", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("qes").description()); - Assertions.assertEquals("qglhq", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("qes").displayName()); - Assertions.assertEquals("ufo", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("qes").documentationUrl()); - Assertions.assertEquals("jywif", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("qes").dataSchemaUrl()); - Assertions.assertEquals("gdf", model.partnerTopicInfo().source()); - Assertions.assertEquals("zlhjxrifkwmrvkt", model.partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("zntocipaouajps", model.partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("cmpoyfdkfogkny", model.partnerDestinationInfo().name()); - Assertions.assertEquals("ofjdde", model.partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("eupewnwreitjz", - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("lusarh", - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T00:37:18Z"), - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("qhsmyurkdtml", model.messageForActivation()); - Assertions.assertEquals(ChannelProvisioningState.SUCCEEDED, model.provisioningState()); - Assertions.assertEquals(ReadinessState.ACTIVATED, model.readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T18:43:06Z"), model.expirationTimeIfNotActivatedUtc()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ChannelInner model = new ChannelInner().withChannelType(ChannelType.PARTNER_TOPIC) - .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("oizh") - .withResourceGroupName("rxybqsoq") - .withName("gkdmb") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("qes", - new InlineEventProperties().withDescription("ufpdznrbtcqq") - .withDisplayName("qglhq") - .withDocumentationUrl("ufo") - .withDataSchemaUrl("jywif")))) - .withSource("gdf")) - .withPartnerDestinationInfo(new PartnerDestinationInfo().withAzureSubscriptionId("zlhjxrifkwmrvkt") - .withResourceGroupName("zntocipaouajps") - .withName("cmpoyfdkfogkny") - .withEndpointServiceContext("ofjdde") - .withResourceMoveChangeHistory( - Arrays.asList(new ResourceMoveChangeHistory().withAzureSubscriptionId("eupewnwreitjz") - .withResourceGroupName("lusarh") - .withChangedTimeUtc(OffsetDateTime.parse("2021-11-04T00:37:18Z"))))) - .withMessageForActivation("qhsmyurkdtml") - .withProvisioningState(ChannelProvisioningState.SUCCEEDED) - .withReadinessState(ReadinessState.ACTIVATED) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-01-05T18:43:06Z")); - model = BinaryData.fromObject(model).toObject(ChannelInner.class); - Assertions.assertEquals(ChannelType.PARTNER_TOPIC, model.channelType()); - Assertions.assertEquals("oizh", model.partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("rxybqsoq", model.partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("gkdmb", model.partnerTopicInfo().name()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("ufpdznrbtcqq", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("qes").description()); - Assertions.assertEquals("qglhq", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("qes").displayName()); - Assertions.assertEquals("ufo", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("qes").documentationUrl()); - Assertions.assertEquals("jywif", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("qes").dataSchemaUrl()); - Assertions.assertEquals("gdf", model.partnerTopicInfo().source()); - Assertions.assertEquals("zlhjxrifkwmrvkt", model.partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("zntocipaouajps", model.partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("cmpoyfdkfogkny", model.partnerDestinationInfo().name()); - Assertions.assertEquals("ofjdde", model.partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("eupewnwreitjz", - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("lusarh", - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T00:37:18Z"), - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("qhsmyurkdtml", model.messageForActivation()); - Assertions.assertEquals(ChannelProvisioningState.SUCCEEDED, model.provisioningState()); - Assertions.assertEquals(ReadinessState.ACTIVATED, model.readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T18:43:06Z"), model.expirationTimeIfNotActivatedUtc()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelPropertiesTests.java deleted file mode 100644 index e9bebd91e49e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelPropertiesTests.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ChannelProperties; -import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; -import com.azure.resourcemanager.eventgrid.models.ChannelType; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; -import com.azure.resourcemanager.eventgrid.models.ReadinessState; -import com.azure.resourcemanager.eventgrid.models.ResourceMoveChangeHistory; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ChannelPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ChannelProperties model = BinaryData.fromString( - "{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"rqobmtuk\",\"resourceGroupName\":\"ryrtihfxtijbpzv\",\"name\":\"wzsymglzufcy\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"ivyqniwbybrkxvd\":{\"description\":\"hanufhfcbjysagi\",\"displayName\":\"xqhabi\",\"documentationUrl\":\"ikxwc\",\"dataSchemaUrl\":\"yscnpqxu\"},\"mkkvnip\":{\"description\":\"jgrtfwvukxga\",\"displayName\":\"ccsnhsjc\",\"documentationUrl\":\"ejhkry\",\"dataSchemaUrl\":\"napczwlokjy\"}}},\"source\":\"xzjnchgejs\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"mailzydehojw\",\"resourceGroupName\":\"huxinpmqnj\",\"name\":\"wixjsprozvcp\",\"endpointServiceContext\":\"eg\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"fdatsc\",\"resourceGroupName\":\"vpjhulsuuv\",\"changedTimeUtc\":\"2021-07-02T09:33:18Z\"},{\"azureSubscriptionId\":\"zkrwfn\",\"resourceGroupName\":\"odjpslwejd\",\"changedTimeUtc\":\"2021-02-19T06:09:33Z\"},{\"azureSubscriptionId\":\"yoqpsoaccta\",\"resourceGroupName\":\"kljla\",\"changedTimeUtc\":\"2021-06-15T07:28:27Z\"},{\"azureSubscriptionId\":\"yffdfdos\",\"resourceGroupName\":\"expa\",\"changedTimeUtc\":\"2021-04-29T11:27:29Z\"}]},\"messageForActivation\":\"hmsbzjhcrzevdp\",\"provisioningState\":\"Deleting\",\"readinessState\":\"Activated\",\"expirationTimeIfNotActivatedUtc\":\"2021-08-21T16:25:47Z\"}") - .toObject(ChannelProperties.class); - Assertions.assertEquals(ChannelType.PARTNER_TOPIC, model.channelType()); - Assertions.assertEquals("rqobmtuk", model.partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("ryrtihfxtijbpzv", model.partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("wzsymglzufcy", model.partnerTopicInfo().name()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("hanufhfcbjysagi", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("ivyqniwbybrkxvd").description()); - Assertions.assertEquals("xqhabi", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("ivyqniwbybrkxvd").displayName()); - Assertions.assertEquals("ikxwc", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("ivyqniwbybrkxvd").documentationUrl()); - Assertions.assertEquals("yscnpqxu", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("ivyqniwbybrkxvd").dataSchemaUrl()); - Assertions.assertEquals("xzjnchgejs", model.partnerTopicInfo().source()); - Assertions.assertEquals("mailzydehojw", model.partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("huxinpmqnj", model.partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("wixjsprozvcp", model.partnerDestinationInfo().name()); - Assertions.assertEquals("eg", model.partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("fdatsc", - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("vpjhulsuuv", - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-02T09:33:18Z"), - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("hmsbzjhcrzevdp", model.messageForActivation()); - Assertions.assertEquals(ChannelProvisioningState.DELETING, model.provisioningState()); - Assertions.assertEquals(ReadinessState.ACTIVATED, model.readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T16:25:47Z"), model.expirationTimeIfNotActivatedUtc()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ChannelProperties model = new ChannelProperties().withChannelType(ChannelType.PARTNER_TOPIC) - .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("rqobmtuk") - .withResourceGroupName("ryrtihfxtijbpzv") - .withName("wzsymglzufcy") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("ivyqniwbybrkxvd", - new InlineEventProperties().withDescription("hanufhfcbjysagi") - .withDisplayName("xqhabi") - .withDocumentationUrl("ikxwc") - .withDataSchemaUrl("yscnpqxu"), - "mkkvnip", - new InlineEventProperties().withDescription("jgrtfwvukxga") - .withDisplayName("ccsnhsjc") - .withDocumentationUrl("ejhkry") - .withDataSchemaUrl("napczwlokjy")))) - .withSource("xzjnchgejs")) - .withPartnerDestinationInfo(new PartnerDestinationInfo().withAzureSubscriptionId("mailzydehojw") - .withResourceGroupName("huxinpmqnj") - .withName("wixjsprozvcp") - .withEndpointServiceContext("eg") - .withResourceMoveChangeHistory(Arrays.asList( - new ResourceMoveChangeHistory().withAzureSubscriptionId("fdatsc") - .withResourceGroupName("vpjhulsuuv") - .withChangedTimeUtc(OffsetDateTime.parse("2021-07-02T09:33:18Z")), - new ResourceMoveChangeHistory().withAzureSubscriptionId("zkrwfn") - .withResourceGroupName("odjpslwejd") - .withChangedTimeUtc(OffsetDateTime.parse("2021-02-19T06:09:33Z")), - new ResourceMoveChangeHistory().withAzureSubscriptionId("yoqpsoaccta") - .withResourceGroupName("kljla") - .withChangedTimeUtc(OffsetDateTime.parse("2021-06-15T07:28:27Z")), - new ResourceMoveChangeHistory().withAzureSubscriptionId("yffdfdos") - .withResourceGroupName("expa") - .withChangedTimeUtc(OffsetDateTime.parse("2021-04-29T11:27:29Z"))))) - .withMessageForActivation("hmsbzjhcrzevdp") - .withProvisioningState(ChannelProvisioningState.DELETING) - .withReadinessState(ReadinessState.ACTIVATED) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-08-21T16:25:47Z")); - model = BinaryData.fromObject(model).toObject(ChannelProperties.class); - Assertions.assertEquals(ChannelType.PARTNER_TOPIC, model.channelType()); - Assertions.assertEquals("rqobmtuk", model.partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("ryrtihfxtijbpzv", model.partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("wzsymglzufcy", model.partnerTopicInfo().name()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("hanufhfcbjysagi", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("ivyqniwbybrkxvd").description()); - Assertions.assertEquals("xqhabi", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("ivyqniwbybrkxvd").displayName()); - Assertions.assertEquals("ikxwc", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("ivyqniwbybrkxvd").documentationUrl()); - Assertions.assertEquals("yscnpqxu", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("ivyqniwbybrkxvd").dataSchemaUrl()); - Assertions.assertEquals("xzjnchgejs", model.partnerTopicInfo().source()); - Assertions.assertEquals("mailzydehojw", model.partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("huxinpmqnj", model.partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("wixjsprozvcp", model.partnerDestinationInfo().name()); - Assertions.assertEquals("eg", model.partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("fdatsc", - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("vpjhulsuuv", - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-02T09:33:18Z"), - model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("hmsbzjhcrzevdp", model.messageForActivation()); - Assertions.assertEquals(ChannelProvisioningState.DELETING, model.provisioningState()); - Assertions.assertEquals(ReadinessState.ACTIVATED, model.readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T16:25:47Z"), model.expirationTimeIfNotActivatedUtc()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelUpdateParametersPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelUpdateParametersPropertiesTests.java deleted file mode 100644 index 0c754555c298..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelUpdateParametersPropertiesTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ChannelUpdateParametersProperties; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerUpdateDestinationInfo; -import com.azure.resourcemanager.eventgrid.models.PartnerUpdateTopicInfo; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ChannelUpdateParametersPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ChannelUpdateParametersProperties model = BinaryData.fromString( - "{\"expirationTimeIfNotActivatedUtc\":\"2021-11-08T18:58:31Z\",\"partnerDestinationInfo\":{\"endpointType\":\"PartnerUpdateDestinationInfo\"},\"partnerTopicInfo\":{\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"zga\":{\"description\":\"muouqfp\",\"displayName\":\"zw\",\"documentationUrl\":\"g\",\"dataSchemaUrl\":\"tnwu\"},\"i\":{\"description\":\"ufizuckyf\",\"displayName\":\"rfidfvzwdz\",\"documentationUrl\":\"tymw\",\"dataSchemaUrl\":\"dkfthwxmnt\"},\"cs\":{\"description\":\"opvkmijcm\",\"displayName\":\"dcuf\",\"documentationUrl\":\"srp\",\"dataSchemaUrl\":\"zidnsezcxtbzsgfy\"},\"dqxhcrmnohjtckwh\":{\"description\":\"wmdwzjeiachboo\",\"displayName\":\"lnrosfqp\",\"documentationUrl\":\"ehzzvypyqrim\",\"dataSchemaUrl\":\"npvswjdkirso\"}}}}}") - .toObject(ChannelUpdateParametersProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T18:58:31Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("muouqfp", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("zga").description()); - Assertions.assertEquals("zw", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("zga").displayName()); - Assertions.assertEquals("g", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("zga").documentationUrl()); - Assertions.assertEquals("tnwu", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("zga").dataSchemaUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ChannelUpdateParametersProperties model - = new ChannelUpdateParametersProperties() - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-11-08T18:58:31Z")) - .withPartnerDestinationInfo(new PartnerUpdateDestinationInfo()) - .withPartnerTopicInfo(new PartnerUpdateTopicInfo() - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("zga", - new InlineEventProperties().withDescription("muouqfp") - .withDisplayName("zw") - .withDocumentationUrl("g") - .withDataSchemaUrl("tnwu"), - "i", - new InlineEventProperties().withDescription("ufizuckyf") - .withDisplayName("rfidfvzwdz") - .withDocumentationUrl("tymw") - .withDataSchemaUrl("dkfthwxmnt"), - "cs", - new InlineEventProperties().withDescription("opvkmijcm") - .withDisplayName("dcuf") - .withDocumentationUrl("srp") - .withDataSchemaUrl("zidnsezcxtbzsgfy"), - "dqxhcrmnohjtckwh", - new InlineEventProperties().withDescription("wmdwzjeiachboo") - .withDisplayName("lnrosfqp") - .withDocumentationUrl("ehzzvypyqrim") - .withDataSchemaUrl("npvswjdkirso"))))); - model = BinaryData.fromObject(model).toObject(ChannelUpdateParametersProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T18:58:31Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("muouqfp", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("zga").description()); - Assertions.assertEquals("zw", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("zga").displayName()); - Assertions.assertEquals("g", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("zga").documentationUrl()); - Assertions.assertEquals("tnwu", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("zga").dataSchemaUrl()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelUpdateParametersTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelUpdateParametersTests.java deleted file mode 100644 index 92efc6567385..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelUpdateParametersTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.ChannelUpdateParameters; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerUpdateDestinationInfo; -import com.azure.resourcemanager.eventgrid.models.PartnerUpdateTopicInfo; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ChannelUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ChannelUpdateParameters model = BinaryData.fromString( - "{\"properties\":{\"expirationTimeIfNotActivatedUtc\":\"2021-08-27T18:55:51Z\",\"partnerDestinationInfo\":{\"endpointType\":\"PartnerUpdateDestinationInfo\"},\"partnerTopicInfo\":{\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"gbquxigj\":{\"description\":\"rtumkdosvq\",\"displayName\":\"bmdg\",\"documentationUrl\":\"jfddgmbmbe\",\"dataSchemaUrl\":\"pbhtqqrolfpfpsa\"},\"vpys\":{\"description\":\"gzjaoyfhrtxilne\",\"displayName\":\"ujysvle\",\"documentationUrl\":\"vfqawrlyxwjkcpr\",\"dataSchemaUrl\":\"wbxgjvt\"}}}}}}") - .toObject(ChannelUpdateParameters.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T18:55:51Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("rtumkdosvq", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("gbquxigj").description()); - Assertions.assertEquals("bmdg", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("gbquxigj").displayName()); - Assertions.assertEquals("jfddgmbmbe", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("gbquxigj").documentationUrl()); - Assertions.assertEquals("pbhtqqrolfpfpsa", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("gbquxigj").dataSchemaUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ChannelUpdateParameters model - = new ChannelUpdateParameters() - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-08-27T18:55:51Z")) - .withPartnerDestinationInfo(new PartnerUpdateDestinationInfo()) - .withPartnerTopicInfo(new PartnerUpdateTopicInfo() - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("gbquxigj", - new InlineEventProperties().withDescription("rtumkdosvq") - .withDisplayName("bmdg") - .withDocumentationUrl("jfddgmbmbe") - .withDataSchemaUrl("pbhtqqrolfpfpsa"), - "vpys", - new InlineEventProperties().withDescription("gzjaoyfhrtxilne") - .withDisplayName("ujysvle") - .withDocumentationUrl("vfqawrlyxwjkcpr") - .withDataSchemaUrl("wbxgjvt"))))); - model = BinaryData.fromObject(model).toObject(ChannelUpdateParameters.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T18:55:51Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("rtumkdosvq", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("gbquxigj").description()); - Assertions.assertEquals("bmdg", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("gbquxigj").displayName()); - Assertions.assertEquals("jfddgmbmbe", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("gbquxigj").documentationUrl()); - Assertions.assertEquals("pbhtqqrolfpfpsa", - model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("gbquxigj").dataSchemaUrl()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 632b86977269..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.Channel; -import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; -import com.azure.resourcemanager.eventgrid.models.ChannelType; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; -import com.azure.resourcemanager.eventgrid.models.ReadinessState; -import com.azure.resourcemanager.eventgrid.models.ResourceMoveChangeHistory; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ChannelsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"rdi\",\"resourceGroupName\":\"dw\",\"name\":\"fowxwyovcxjsgbi\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"eksbuhoduchvls\":{},\"rdpibfd\":{},\"jdusspyszekb\":{},\"wlkaaggkrehbfrnu\":{}}},\"source\":\"ff\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"iimreoagsqta\",\"resourceGroupName\":\"usrexxf\",\"name\":\"sqwudohzilfmnli\",\"endpointServiceContext\":\"simsfeypofqpmb\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"sdrmmttjxophgerh\",\"resourceGroupName\":\"vgohtw\",\"changedTimeUtc\":\"2021-11-04T11:49:52Z\"},{\"azureSubscriptionId\":\"lrixysfnimsq\",\"resourceGroupName\":\"wwmhkruwae\",\"changedTimeUtc\":\"2021-03-09T04:09:25Z\"}]},\"messageForActivation\":\"pmlqoinhzduew\",\"provisioningState\":\"Succeeded\",\"readinessState\":\"Activated\",\"expirationTimeIfNotActivatedUtc\":\"2021-10-19T00:18:47Z\"},\"id\":\"knjdiqfliejhp\",\"name\":\"lbiedfsbw\",\"type\":\"eivbvz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Channel response = manager.channels() - .define("iezeagm") - .withExistingPartnerNamespace("wpqrtvaozn", "ni") - .withChannelType(ChannelType.PARTNER_TOPIC) - .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("gedhfpjstlzm") - .withResourceGroupName("syjdeolctae") - .withName("syrled") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("vtqigdxzvsgeafg", new InlineEventProperties()))) - .withSource("sehxlzsxezp")) - .withPartnerDestinationInfo(new PartnerDestinationInfo().withAzureSubscriptionId("waaeskyfjl") - .withResourceGroupName("eqtoyrpl") - .withName("lajmllp") - .withEndpointServiceContext("evhamfowg") - .withResourceMoveChangeHistory( - Arrays.asList(new ResourceMoveChangeHistory().withAzureSubscriptionId("kek") - .withResourceGroupName("kzwaqxofq") - .withChangedTimeUtc(OffsetDateTime.parse("2021-12-07T21:46:47Z"))))) - .withMessageForActivation("iqbplvfidusz") - .withProvisioningState(ChannelProvisioningState.DELETING) - .withReadinessState(ReadinessState.ACTIVATED) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-06-23T19:55:38Z")) - .create(); - - Assertions.assertEquals(ChannelType.PARTNER_TOPIC, response.channelType()); - Assertions.assertEquals("rdi", response.partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("dw", response.partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("fowxwyovcxjsgbi", response.partnerTopicInfo().name()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("ff", response.partnerTopicInfo().source()); - Assertions.assertEquals("iimreoagsqta", response.partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("usrexxf", response.partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("sqwudohzilfmnli", response.partnerDestinationInfo().name()); - Assertions.assertEquals("simsfeypofqpmb", response.partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("sdrmmttjxophgerh", - response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("vgohtw", - response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T11:49:52Z"), - response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("pmlqoinhzduew", response.messageForActivation()); - Assertions.assertEquals(ChannelProvisioningState.SUCCEEDED, response.provisioningState()); - Assertions.assertEquals(ReadinessState.ACTIVATED, response.readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-19T00:18:47Z"), - response.expirationTimeIfNotActivatedUtc()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteMockTests.java deleted file mode 100644 index 62b52bf37cf8..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ChannelsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.channels().delete("ylnkkbjpjvlywltm", "wob", "jw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlWithResponseMockTests.java deleted file mode 100644 index f0814a36e456..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ChannelsGetFullUrlWithResponseMockTests { - @Test - public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"rthqe\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EventSubscriptionFullUrl response = manager.channels() - .getFullUrlWithResponse("vlzw", "vgmfalkzazmgok", "dgjqafkmkro", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rthqe", response.endpointUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetWithResponseMockTests.java deleted file mode 100644 index 57c60c9f41c3..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.Channel; -import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; -import com.azure.resourcemanager.eventgrid.models.ChannelType; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.ReadinessState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ChannelsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"iyewhfjsrwqr\",\"resourceGroupName\":\"tfgcwvrr\",\"name\":\"qnt\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"hvmaxgnuyeamcmhu\":{},\"fjeceho\":{},\"wcpqtwl\":{},\"esq\":{}}},\"source\":\"gvrbny\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"oilacidu\",\"resourceGroupName\":\"leipjl\",\"name\":\"yxpzruzythqk\",\"endpointServiceContext\":\"hbgxvel\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"nxdmnitmujdtv\",\"resourceGroupName\":\"lyymffhmjpddny\",\"changedTimeUtc\":\"2020-12-20T18:27:01Z\"},{\"azureSubscriptionId\":\"v\",\"resourceGroupName\":\"mzqmzjqrb\",\"changedTimeUtc\":\"2021-07-14T11:36:59Z\"},{\"azureSubscriptionId\":\"mdyfoebojtj\",\"resourceGroupName\":\"g\",\"changedTimeUtc\":\"2021-11-07T16:50:18Z\"}]},\"messageForActivation\":\"o\",\"provisioningState\":\"IdleDueToMirroredPartnerDestinationDeletion\",\"readinessState\":\"NeverActivated\",\"expirationTimeIfNotActivatedUtc\":\"2021-10-26T12:31:57Z\"},\"id\":\"ilaywkdcwm\",\"name\":\"syril\",\"type\":\"hxdqaol\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Channel response = manager.channels() - .getWithResponse("zwnykdidjchl", "mpwctoflds", "acdhztxkbr", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ChannelType.PARTNER_TOPIC, response.channelType()); - Assertions.assertEquals("iyewhfjsrwqr", response.partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("tfgcwvrr", response.partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("qnt", response.partnerTopicInfo().name()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("gvrbny", response.partnerTopicInfo().source()); - Assertions.assertEquals("oilacidu", response.partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("leipjl", response.partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("yxpzruzythqk", response.partnerDestinationInfo().name()); - Assertions.assertEquals("hbgxvel", response.partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("nxdmnitmujdtv", - response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("lyymffhmjpddny", - response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-20T18:27:01Z"), - response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("o", response.messageForActivation()); - Assertions.assertEquals(ChannelProvisioningState.IDLE_DUE_TO_MIRRORED_PARTNER_DESTINATION_DELETION, - response.provisioningState()); - Assertions.assertEquals(ReadinessState.NEVER_ACTIVATED, response.readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-26T12:31:57Z"), - response.expirationTimeIfNotActivatedUtc()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceMockTests.java deleted file mode 100644 index bc6205f08a3c..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.Channel; -import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; -import com.azure.resourcemanager.eventgrid.models.ChannelType; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.ReadinessState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ChannelsListByPartnerNamespaceMockTests { - @Test - public void testListByPartnerNamespace() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"sabvcip\",\"resourceGroupName\":\"zafczuumljci\",\"name\":\"pefyc\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"tjnsx\":{}}},\"source\":\"jlnsj\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"uyx\",\"resourceGroupName\":\"xqvmvuay\",\"name\":\"adxkxeqbwpntghy\",\"endpointServiceContext\":\"a\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"nx\",\"resourceGroupName\":\"u\",\"changedTimeUtc\":\"2021-11-29T16:59:13Z\"},{\"azureSubscriptionId\":\"adltxkpbqhvfdq\",\"resourceGroupName\":\"w\",\"changedTimeUtc\":\"2021-03-31T05:50:35Z\"},{\"azureSubscriptionId\":\"zdanojis\",\"resourceGroupName\":\"lmvokat\",\"changedTimeUtc\":\"2021-02-08T13:35:15Z\"}]},\"messageForActivation\":\"ctibpvbka\",\"provisioningState\":\"Succeeded\",\"readinessState\":\"NeverActivated\",\"expirationTimeIfNotActivatedUtc\":\"2021-01-10T11:11:59Z\"},\"id\":\"dfwakwseivmak\",\"name\":\"hysowljuxlkbect\",\"type\":\"tfjmskdchmaiub\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.channels() - .listByPartnerNamespace("mgb", "hlqtxnrflkn", "rndpgfjodhdaqotw", 842100543, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ChannelType.PARTNER_TOPIC, response.iterator().next().channelType()); - Assertions.assertEquals("sabvcip", response.iterator().next().partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("zafczuumljci", response.iterator().next().partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("pefyc", response.iterator().next().partnerTopicInfo().name()); - Assertions.assertEquals(EventDefinitionKind.INLINE, - response.iterator().next().partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("jlnsj", response.iterator().next().partnerTopicInfo().source()); - Assertions.assertEquals("uyx", response.iterator().next().partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("xqvmvuay", response.iterator().next().partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("adxkxeqbwpntghy", response.iterator().next().partnerDestinationInfo().name()); - Assertions.assertEquals("a", response.iterator().next().partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("nx", - response.iterator() - .next() - .partnerDestinationInfo() - .resourceMoveChangeHistory() - .get(0) - .azureSubscriptionId()); - Assertions.assertEquals("u", - response.iterator().next().partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-29T16:59:13Z"), - response.iterator().next().partnerDestinationInfo().resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("ctibpvbka", response.iterator().next().messageForActivation()); - Assertions.assertEquals(ChannelProvisioningState.SUCCEEDED, response.iterator().next().provisioningState()); - Assertions.assertEquals(ReadinessState.NEVER_ACTIVATED, response.iterator().next().readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-10T11:11:59Z"), - response.iterator().next().expirationTimeIfNotActivatedUtc()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListResultTests.java deleted file mode 100644 index 5f7f532b0088..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListResultTests.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ChannelInner; -import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; -import com.azure.resourcemanager.eventgrid.models.ChannelType; -import com.azure.resourcemanager.eventgrid.models.ChannelsListResult; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; -import com.azure.resourcemanager.eventgrid.models.ReadinessState; -import com.azure.resourcemanager.eventgrid.models.ResourceMoveChangeHistory; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ChannelsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ChannelsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"channelType\":\"PartnerDestination\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"ljavbqid\",\"resourceGroupName\":\"ajzyul\",\"name\":\"u\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"hbzhfepg\":{},\"gqexzlocxs\":{},\"paierh\":{}}},\"source\":\"csglum\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"tjaodxobnb\",\"resourceGroupName\":\"k\",\"name\":\"xo\",\"endpointServiceContext\":\"jionpimexgstxgc\",\"resourceMoveChangeHistory\":[{}]},\"messageForActivation\":\"maajrmvdjwzrlo\",\"provisioningState\":\"IdleDueToMirroredPartnerTopicDeletion\",\"readinessState\":\"Activated\",\"expirationTimeIfNotActivatedUtc\":\"2021-11-18T17:40:33Z\"},\"id\":\"coejctbzaqs\",\"name\":\"sycbkbfk\",\"type\":\"ukdkexxppofmxa\"}],\"nextLink\":\"fjpgddtocjjxhvp\"}") - .toObject(ChannelsListResult.class); - Assertions.assertEquals(ChannelType.PARTNER_DESTINATION, model.value().get(0).channelType()); - Assertions.assertEquals("ljavbqid", model.value().get(0).partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("ajzyul", model.value().get(0).partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("u", model.value().get(0).partnerTopicInfo().name()); - Assertions.assertEquals(EventDefinitionKind.INLINE, - model.value().get(0).partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("csglum", model.value().get(0).partnerTopicInfo().source()); - Assertions.assertEquals("tjaodxobnb", model.value().get(0).partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("k", model.value().get(0).partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("xo", model.value().get(0).partnerDestinationInfo().name()); - Assertions.assertEquals("jionpimexgstxgc", - model.value().get(0).partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("maajrmvdjwzrlo", model.value().get(0).messageForActivation()); - Assertions.assertEquals(ChannelProvisioningState.IDLE_DUE_TO_MIRRORED_PARTNER_TOPIC_DELETION, - model.value().get(0).provisioningState()); - Assertions.assertEquals(ReadinessState.ACTIVATED, model.value().get(0).readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T17:40:33Z"), - model.value().get(0).expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals("fjpgddtocjjxhvp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ChannelsListResult model = new ChannelsListResult() - .withValue(Arrays.asList(new ChannelInner().withChannelType(ChannelType.PARTNER_DESTINATION) - .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("ljavbqid") - .withResourceGroupName("ajzyul") - .withName("u") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("hbzhfepg", new InlineEventProperties(), "gqexzlocxs", - new InlineEventProperties(), "paierh", new InlineEventProperties()))) - .withSource("csglum")) - .withPartnerDestinationInfo(new PartnerDestinationInfo().withAzureSubscriptionId("tjaodxobnb") - .withResourceGroupName("k") - .withName("xo") - .withEndpointServiceContext("jionpimexgstxgc") - .withResourceMoveChangeHistory(Arrays.asList(new ResourceMoveChangeHistory()))) - .withMessageForActivation("maajrmvdjwzrlo") - .withProvisioningState(ChannelProvisioningState.IDLE_DUE_TO_MIRRORED_PARTNER_TOPIC_DELETION) - .withReadinessState(ReadinessState.ACTIVATED) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-11-18T17:40:33Z")))) - .withNextLink("fjpgddtocjjxhvp"); - model = BinaryData.fromObject(model).toObject(ChannelsListResult.class); - Assertions.assertEquals(ChannelType.PARTNER_DESTINATION, model.value().get(0).channelType()); - Assertions.assertEquals("ljavbqid", model.value().get(0).partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("ajzyul", model.value().get(0).partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("u", model.value().get(0).partnerTopicInfo().name()); - Assertions.assertEquals(EventDefinitionKind.INLINE, - model.value().get(0).partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("csglum", model.value().get(0).partnerTopicInfo().source()); - Assertions.assertEquals("tjaodxobnb", model.value().get(0).partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("k", model.value().get(0).partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("xo", model.value().get(0).partnerDestinationInfo().name()); - Assertions.assertEquals("jionpimexgstxgc", - model.value().get(0).partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("maajrmvdjwzrlo", model.value().get(0).messageForActivation()); - Assertions.assertEquals(ChannelProvisioningState.IDLE_DUE_TO_MIRRORED_PARTNER_TOPIC_DELETION, - model.value().get(0).provisioningState()); - Assertions.assertEquals(ReadinessState.ACTIVATED, model.value().get(0).readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T17:40:33Z"), - model.value().get(0).expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals("fjpgddtocjjxhvp", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateWithResponseMockTests.java deleted file mode 100644 index 66c53fee7f2a..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.ChannelUpdateParameters; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerUpdateDestinationInfo; -import com.azure.resourcemanager.eventgrid.models.PartnerUpdateTopicInfo; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ChannelsUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.channels() - .updateWithResponse("lwyjfnqzocrdz", "czeuntgx", "ncaqttiekoifu", - new ChannelUpdateParameters() - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-03-06T19:07:52Z")) - .withPartnerDestinationInfo(new PartnerUpdateDestinationInfo()) - .withPartnerTopicInfo(new PartnerUpdateTopicInfo() - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("rihl", new InlineEventProperties())))), - com.azure.core.util.Context.NONE); - - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientCertificateAuthenticationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientCertificateAuthenticationTests.java deleted file mode 100644 index bc65eac3514e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientCertificateAuthenticationTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateAuthentication; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateValidationScheme; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClientCertificateAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientCertificateAuthentication model = BinaryData.fromString( - "{\"validationScheme\":\"ThumbprintMatch\",\"allowedThumbprints\":[\"zrkgqhcjrefovg\",\"kqsleyyvxy\",\"jpkcattpng\",\"cr\"]}") - .toObject(ClientCertificateAuthentication.class); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, model.validationScheme()); - Assertions.assertEquals("zrkgqhcjrefovg", model.allowedThumbprints().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientCertificateAuthentication model = new ClientCertificateAuthentication() - .withValidationScheme(ClientCertificateValidationScheme.THUMBPRINT_MATCH) - .withAllowedThumbprints(Arrays.asList("zrkgqhcjrefovg", "kqsleyyvxy", "jpkcattpng", "cr")); - model = BinaryData.fromObject(model).toObject(ClientCertificateAuthentication.class); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, model.validationScheme()); - Assertions.assertEquals("zrkgqhcjrefovg", model.allowedThumbprints().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupInnerTests.java deleted file mode 100644 index 7998289bb969..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner; -import org.junit.jupiter.api.Assertions; - -public final class ClientGroupInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientGroupInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"eojnxqbzvddn\",\"query\":\"ndei\",\"provisioningState\":\"Creating\"},\"id\":\"npzaoq\",\"name\":\"uhrhcffcyddgl\",\"type\":\"jthjqkwpyei\"}") - .toObject(ClientGroupInner.class); - Assertions.assertEquals("eojnxqbzvddn", model.description()); - Assertions.assertEquals("ndei", model.query()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientGroupInner model = new ClientGroupInner().withDescription("eojnxqbzvddn").withQuery("ndei"); - model = BinaryData.fromObject(model).toObject(ClientGroupInner.class); - Assertions.assertEquals("eojnxqbzvddn", model.description()); - Assertions.assertEquals("ndei", model.query()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupPropertiesTests.java deleted file mode 100644 index 4a710aab6508..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClientGroupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientGroupProperties model - = BinaryData.fromString("{\"description\":\"mqc\",\"query\":\"q\",\"provisioningState\":\"Succeeded\"}") - .toObject(ClientGroupProperties.class); - Assertions.assertEquals("mqc", model.description()); - Assertions.assertEquals("q", model.query()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientGroupProperties model = new ClientGroupProperties().withDescription("mqc").withQuery("q"); - model = BinaryData.fromObject(model).toObject(ClientGroupProperties.class); - Assertions.assertEquals("mqc", model.description()); - Assertions.assertEquals("q", model.query()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsCreateOrUpdateMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsCreateOrUpdateMockTests.java deleted file mode 100644 index 5dfad62edb97..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.ClientGroup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClientGroupsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"description\":\"hg\",\"query\":\"djuxdbdljzgd\",\"provisioningState\":\"Succeeded\"},\"id\":\"uqbsgzlrqhb\",\"name\":\"nq\",\"type\":\"gdxwbsfpyxx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClientGroup response = manager.clientGroups() - .define("o") - .withExistingNamespace("kebhuhkslgw", "okhu") - .withDescription("zcqypzqzufgsyf") - .withQuery("y") - .create(); - - Assertions.assertEquals("hg", response.description()); - Assertions.assertEquals("djuxdbdljzgd", response.query()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsDeleteMockTests.java deleted file mode 100644 index 0f7779a102a0..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClientGroupsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clientGroups().delete("pabdsrg", "ajglzrsubklr", "hjnlt", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsGetWithResponseMockTests.java deleted file mode 100644 index baf5ac709700..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.ClientGroup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClientGroupsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"description\":\"npd\",\"query\":\"igjsugswhgs\",\"provisioningState\":\"Deleted\"},\"id\":\"wwnbafoctohz\",\"name\":\"aquvwsxbgnvkervq\",\"type\":\"hoadhrsxqvzv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClientGroup response = manager.clientGroups() - .getWithResponse("pbwxgoooxz", "rad", "s", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("npd", response.description()); - Assertions.assertEquals("igjsugswhgs", response.query()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListByNamespaceMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListByNamespaceMockTests.java deleted file mode 100644 index 0aabfff594a4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListByNamespaceMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.ClientGroup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClientGroupsListByNamespaceMockTests { - @Test - public void testListByNamespace() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"vpaklozkxbz\",\"query\":\"ejpl\",\"provisioningState\":\"Canceled\"},\"id\":\"bttt\",\"name\":\"gs\",\"type\":\"xunrswgkpjhboy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clientGroups() - .listByNamespace("etjdvqydieqqkwa", "uwdxvqzxoebwgj", "bibanbau", 319172782, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vpaklozkxbz", response.iterator().next().description()); - Assertions.assertEquals("ejpl", response.iterator().next().query()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListResultTests.java deleted file mode 100644 index 5298996c0d30..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListResultTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner; -import com.azure.resourcemanager.eventgrid.models.ClientGroupsListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClientGroupsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientGroupsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"description\":\"igdtopbob\",\"query\":\"ghmewuam\",\"provisioningState\":\"Creating\"},\"id\":\"z\",\"name\":\"yvvtpgvdfgio\",\"type\":\"kftutqxlngxlefg\"},{\"properties\":{\"description\":\"xkrxdqmi\",\"query\":\"thz\",\"provisioningState\":\"Creating\"},\"id\":\"rabhjybigeho\",\"name\":\"fbowskanyk\",\"type\":\"zlcuiywgqywgndrv\"},{\"properties\":{\"description\":\"zgpphrcgyncocpe\",\"query\":\"vmmcoofs\",\"provisioningState\":\"Deleting\"},\"id\":\"v\",\"name\":\"bmqj\",\"type\":\"abcypmivk\"},{\"properties\":{\"description\":\"uvcc\",\"query\":\"nfnbacfionlebxe\",\"provisioningState\":\"Canceled\"},\"id\":\"zxdpnqbqqw\",\"name\":\"rjfeallnwsubisnj\",\"type\":\"mpmngnzscxaqwoo\"}],\"nextLink\":\"cbonqvpk\"}") - .toObject(ClientGroupsListResult.class); - Assertions.assertEquals("igdtopbob", model.value().get(0).description()); - Assertions.assertEquals("ghmewuam", model.value().get(0).query()); - Assertions.assertEquals("cbonqvpk", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientGroupsListResult model - = new ClientGroupsListResult() - .withValue(Arrays.asList(new ClientGroupInner().withDescription("igdtopbob").withQuery("ghmewuam"), - new ClientGroupInner().withDescription("xkrxdqmi").withQuery("thz"), - new ClientGroupInner().withDescription("zgpphrcgyncocpe").withQuery("vmmcoofs"), - new ClientGroupInner().withDescription("uvcc").withQuery("nfnbacfionlebxe"))) - .withNextLink("cbonqvpk"); - model = BinaryData.fromObject(model).toObject(ClientGroupsListResult.class); - Assertions.assertEquals("igdtopbob", model.value().get(0).description()); - Assertions.assertEquals("ghmewuam", model.value().get(0).query()); - Assertions.assertEquals("cbonqvpk", model.nextLink()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientInnerTests.java deleted file mode 100644 index 697d919201ab..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientInnerTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ClientInner; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateAuthentication; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateValidationScheme; -import com.azure.resourcemanager.eventgrid.models.ClientState; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClientInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"xnj\",\"authenticationName\":\"seiphe\",\"clientCertificateAuthentication\":{\"validationScheme\":\"ThumbprintMatch\",\"allowedThumbprints\":[\"yyien\"]},\"state\":\"Disabled\",\"attributes\":{\"azjpqyegualhbxxh\":\"datatgrhpdjpjumas\",\"zvdudgwdslfhotwm\":\"datajj\",\"pgacftadehxnlty\":\"dataynpwlbj\"},\"provisioningState\":\"Updating\"},\"id\":\"pusuesn\",\"name\":\"wd\",\"type\":\"jbavorxzdm\"}") - .toObject(ClientInner.class); - Assertions.assertEquals("xnj", model.description()); - Assertions.assertEquals("seiphe", model.authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, - model.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("yyien", model.clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.DISABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientInner model = new ClientInner().withDescription("xnj") - .withAuthenticationName("seiphe") - .withClientCertificateAuthentication(new ClientCertificateAuthentication() - .withValidationScheme(ClientCertificateValidationScheme.THUMBPRINT_MATCH) - .withAllowedThumbprints(Arrays.asList("yyien"))) - .withState(ClientState.DISABLED) - .withAttributes(mapOf("azjpqyegualhbxxh", "datatgrhpdjpjumas", "zvdudgwdslfhotwm", "datajj", - "pgacftadehxnlty", "dataynpwlbj")); - model = BinaryData.fromObject(model).toObject(ClientInner.class); - Assertions.assertEquals("xnj", model.description()); - Assertions.assertEquals("seiphe", model.authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, - model.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("yyien", model.clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.DISABLED, model.state()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientPropertiesTests.java deleted file mode 100644 index 749767f3325d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientPropertiesTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ClientProperties; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateAuthentication; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateValidationScheme; -import com.azure.resourcemanager.eventgrid.models.ClientState; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClientPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientProperties model = BinaryData.fromString( - "{\"description\":\"ctbqvudwx\",\"authenticationName\":\"dnvowg\",\"clientCertificateAuthentication\":{\"validationScheme\":\"ThumbprintMatch\",\"allowedThumbprints\":[\"dkcglhsl\",\"zj\",\"yggdtjixh\"]},\"state\":\"Enabled\",\"attributes\":{\"yexfwh\":\"dataqweykhmenev\",\"amdecte\":\"databcibvyvdcsitynn\",\"qsc\":\"dataf\"},\"provisioningState\":\"Updating\"}") - .toObject(ClientProperties.class); - Assertions.assertEquals("ctbqvudwx", model.description()); - Assertions.assertEquals("dnvowg", model.authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, - model.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("dkcglhsl", model.clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.ENABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientProperties model = new ClientProperties().withDescription("ctbqvudwx") - .withAuthenticationName("dnvowg") - .withClientCertificateAuthentication(new ClientCertificateAuthentication() - .withValidationScheme(ClientCertificateValidationScheme.THUMBPRINT_MATCH) - .withAllowedThumbprints(Arrays.asList("dkcglhsl", "zj", "yggdtjixh"))) - .withState(ClientState.ENABLED) - .withAttributes(mapOf("yexfwh", "dataqweykhmenev", "amdecte", "databcibvyvdcsitynn", "qsc", "dataf")); - model = BinaryData.fromObject(model).toObject(ClientProperties.class); - Assertions.assertEquals("ctbqvudwx", model.description()); - Assertions.assertEquals("dnvowg", model.authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, - model.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("dkcglhsl", model.clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.ENABLED, model.state()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsCreateOrUpdateMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsCreateOrUpdateMockTests.java deleted file mode 100644 index ccb8ad4d95c1..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.Client; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateAuthentication; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateValidationScheme; -import com.azure.resourcemanager.eventgrid.models.ClientState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClientsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"description\":\"qrdgrtw\",\"authenticationName\":\"wjzl\",\"clientCertificateAuthentication\":{\"validationScheme\":\"UriMatchesAuthenticationName\",\"allowedThumbprints\":[\"zzwjcayerzrran\",\"ybylpol\"]},\"state\":\"Disabled\",\"attributes\":{\"jwvuag\":\"datasrleinkfscjfn\",\"klzmijajw\":\"dataqwtltngvmreupt\",\"fsvagh\":\"datal\"},\"provisioningState\":\"Succeeded\"},\"id\":\"wl\",\"name\":\"lr\",\"type\":\"igt\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Client response = manager.clients() - .define("hmkvfruwkudrb") - .withExistingNamespace("covdwzqaux", "a") - .withDescription("txudqyeme") - .withAuthenticationName("naucmcirtnee") - .withClientCertificateAuthentication(new ClientCertificateAuthentication() - .withValidationScheme(ClientCertificateValidationScheme.IP_MATCHES_AUTHENTICATION_NAME) - .withAllowedThumbprints(Arrays.asList("cgxefnohaitraniz", "rwgudasmxub", "fbngfcocef"))) - .withState(ClientState.DISABLED) - .withAttributes(mapOf("ud", "datalfmpztr")) - .create(); - - Assertions.assertEquals("qrdgrtw", response.description()); - Assertions.assertEquals("wjzl", response.authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.URI_MATCHES_AUTHENTICATION_NAME, - response.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("zzwjcayerzrran", - response.clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.DISABLED, response.state()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsDeleteMockTests.java deleted file mode 100644 index 136022b0c31d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClientsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clients().delete("v", "yqfttehdpboujst", "fvvdshxcdedsue", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsGetWithResponseMockTests.java deleted file mode 100644 index 2d0fe56a4357..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsGetWithResponseMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.Client; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateValidationScheme; -import com.azure.resourcemanager.eventgrid.models.ClientState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClientsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"description\":\"zqjmueza\",\"authenticationName\":\"vribqlotokht\",\"clientCertificateAuthentication\":{\"validationScheme\":\"DnsMatchesAuthenticationName\",\"allowedThumbprints\":[\"kcqwwxwjyofgwh\",\"kbtlwljssm\",\"tsnld\",\"pwolgisubxb\"]},\"state\":\"Enabled\",\"attributes\":{\"rykwlefk\":\"datagfii\",\"qvzvlu\":\"dataxqceazfpxgn\"},\"provisioningState\":\"Updating\"},\"id\":\"ios\",\"name\":\"scyvaifppuacvf\",\"type\":\"eowpsfxtjdhsoymh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Client response = manager.clients() - .getWithResponse("jlf", "ecominxojjluxxd", "ilz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zqjmueza", response.description()); - Assertions.assertEquals("vribqlotokht", response.authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.DNS_MATCHES_AUTHENTICATION_NAME, - response.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("kcqwwxwjyofgwh", - response.clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.ENABLED, response.state()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsListByNamespaceMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsListByNamespaceMockTests.java deleted file mode 100644 index 425105895352..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsListByNamespaceMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.Client; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateValidationScheme; -import com.azure.resourcemanager.eventgrid.models.ClientState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClientsListByNamespaceMockTests { - @Test - public void testListByNamespace() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"nazku\",\"authenticationName\":\"drey\",\"clientCertificateAuthentication\":{\"validationScheme\":\"SubjectMatchesAuthenticationName\",\"allowedThumbprints\":[\"twwjwzzq\"]},\"state\":\"Enabled\",\"attributes\":{\"qqzzdc\":\"dataukykcyqh\",\"ewfopazdazg\":\"datakeys\",\"mdpv\":\"datasqgpewqcfu\"},\"provisioningState\":\"Failed\"},\"id\":\"qjbknl\",\"name\":\"clctzey\",\"type\":\"wmn\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clients() - .listByNamespace("ygnxcgjtfrnqukt", "fnslnlrxsmy", "trwntfmtbgw", 571744103, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nazku", response.iterator().next().description()); - Assertions.assertEquals("drey", response.iterator().next().authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.SUBJECT_MATCHES_AUTHENTICATION_NAME, - response.iterator().next().clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("twwjwzzq", - response.iterator().next().clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.ENABLED, response.iterator().next().state()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsListResultTests.java deleted file mode 100644 index 4724fb821592..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsListResultTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ClientInner; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateAuthentication; -import com.azure.resourcemanager.eventgrid.models.ClientCertificateValidationScheme; -import com.azure.resourcemanager.eventgrid.models.ClientState; -import com.azure.resourcemanager.eventgrid.models.ClientsListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClientsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"description\":\"pjhvmdajvnys\",\"authenticationName\":\"nqecanoaeup\",\"clientCertificateAuthentication\":{\"validationScheme\":\"EmailMatchesAuthenticationName\",\"allowedThumbprints\":[\"rpmopjmc\",\"atuokthfuiu\"]},\"state\":\"Disabled\",\"attributes\":{\"ozmyzydagfu\":\"datacpkvxodp\"},\"provisioningState\":\"Failed\"},\"id\":\"zyiuokk\",\"name\":\"whrdxwzywqsmbsu\",\"type\":\"exim\"},{\"properties\":{\"description\":\"ocfs\",\"authenticationName\":\"s\",\"clientCertificateAuthentication\":{\"validationScheme\":\"DnsMatchesAuthenticationName\",\"allowedThumbprints\":[\"tki\",\"uxh\",\"yudxorrqnbp\"]},\"state\":\"Disabled\",\"attributes\":{\"qrvkdv\":\"datai\",\"vvdfwatkpnpul\":\"datasllr\",\"wiqzbqjvsovmyo\":\"dataxxbczwtr\",\"zdobpxjmflbvvnch\":\"dataacspkwl\"},\"provisioningState\":\"Succeeded\"},\"id\":\"iwwzjuqk\",\"name\":\"rsa\",\"type\":\"iwkuofos\"},{\"properties\":{\"description\":\"sauuimj\",\"authenticationName\":\"xieduugidyjrr\",\"clientCertificateAuthentication\":{\"validationScheme\":\"UriMatchesAuthenticationName\",\"allowedThumbprints\":[\"v\",\"xc\",\"onpc\",\"hocohslkev\"]},\"state\":\"Enabled\",\"attributes\":{\"ithlvmezyvshxm\":\"datafbuhfmvfaxkffe\",\"gigr\":\"datasbbzo\"},\"provisioningState\":\"Updating\"},\"id\":\"rvjx\",\"name\":\"jnspydp\",\"type\":\"koen\"},{\"properties\":{\"description\":\"knvudwtiukb\",\"authenticationName\":\"ngkpocipazy\",\"clientCertificateAuthentication\":{\"validationScheme\":\"UriMatchesAuthenticationName\",\"allowedThumbprints\":[\"g\"]},\"state\":\"Enabled\",\"attributes\":{\"zntypmrb\":\"datacgygev\",\"ydnfyhxdeoejz\":\"dataizcdrqjsd\",\"jttgzf\":\"datacwif\"},\"provisioningState\":\"Creating\"},\"id\":\"cbkhajdeyeamdph\",\"name\":\"g\",\"type\":\"lpbuxwgipwhonowk\"}],\"nextLink\":\"hwankixzbinjepu\"}") - .toObject(ClientsListResult.class); - Assertions.assertEquals("pjhvmdajvnys", model.value().get(0).description()); - Assertions.assertEquals("nqecanoaeup", model.value().get(0).authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.EMAIL_MATCHES_AUTHENTICATION_NAME, - model.value().get(0).clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("rpmopjmc", - model.value().get(0).clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.DISABLED, model.value().get(0).state()); - Assertions.assertEquals("hwankixzbinjepu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientsListResult model - = new ClientsListResult() - .withValue( - Arrays.asList( - new ClientInner().withDescription("pjhvmdajvnys") - .withAuthenticationName("nqecanoaeup") - .withClientCertificateAuthentication(new ClientCertificateAuthentication() - .withValidationScheme( - ClientCertificateValidationScheme.EMAIL_MATCHES_AUTHENTICATION_NAME) - .withAllowedThumbprints(Arrays.asList("rpmopjmc", "atuokthfuiu"))) - .withState(ClientState.DISABLED) - .withAttributes(mapOf("ozmyzydagfu", "datacpkvxodp")), - new ClientInner().withDescription("ocfs") - .withAuthenticationName("s") - .withClientCertificateAuthentication(new ClientCertificateAuthentication() - .withValidationScheme(ClientCertificateValidationScheme.DNS_MATCHES_AUTHENTICATION_NAME) - .withAllowedThumbprints(Arrays.asList("tki", "uxh", "yudxorrqnbp"))) - .withState(ClientState.DISABLED) - .withAttributes(mapOf("qrvkdv", "datai", "vvdfwatkpnpul", "datasllr", "wiqzbqjvsovmyo", - "dataxxbczwtr", "zdobpxjmflbvvnch", "dataacspkwl")), - new ClientInner().withDescription("sauuimj") - .withAuthenticationName("xieduugidyjrr") - .withClientCertificateAuthentication(new ClientCertificateAuthentication() - .withValidationScheme(ClientCertificateValidationScheme.URI_MATCHES_AUTHENTICATION_NAME) - .withAllowedThumbprints(Arrays.asList("v", "xc", "onpc", "hocohslkev"))) - .withState(ClientState.ENABLED) - .withAttributes(mapOf("ithlvmezyvshxm", "datafbuhfmvfaxkffe", "gigr", "datasbbzo")), - new ClientInner().withDescription("knvudwtiukb") - .withAuthenticationName("ngkpocipazy") - .withClientCertificateAuthentication(new ClientCertificateAuthentication() - .withValidationScheme(ClientCertificateValidationScheme.URI_MATCHES_AUTHENTICATION_NAME) - .withAllowedThumbprints(Arrays.asList("g"))) - .withState(ClientState.ENABLED) - .withAttributes(mapOf("zntypmrb", "datacgygev", "ydnfyhxdeoejz", "dataizcdrqjsd", "jttgzf", - "datacwif")))) - .withNextLink("hwankixzbinjepu"); - model = BinaryData.fromObject(model).toObject(ClientsListResult.class); - Assertions.assertEquals("pjhvmdajvnys", model.value().get(0).description()); - Assertions.assertEquals("nqecanoaeup", model.value().get(0).authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.EMAIL_MATCHES_AUTHENTICATION_NAME, - model.value().get(0).clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("rpmopjmc", - model.value().get(0).clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.DISABLED, model.value().get(0).state()); - Assertions.assertEquals("hwankixzbinjepu", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ConnectionStateTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ConnectionStateTests.java deleted file mode 100644 index 41ea2b5654a5..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ConnectionStateTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.ConnectionState; -import com.azure.resourcemanager.eventgrid.models.PersistedConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class ConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectionState model = BinaryData.fromString( - "{\"status\":\"Disconnected\",\"description\":\"xiebwwaloayqcg\",\"actionsRequired\":\"tzjuzgwyzmhtxo\"}") - .toObject(ConnectionState.class); - Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("xiebwwaloayqcg", model.description()); - Assertions.assertEquals("tzjuzgwyzmhtxo", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectionState model = new ConnectionState().withStatus(PersistedConnectionStatus.DISCONNECTED) - .withDescription("xiebwwaloayqcg") - .withActionsRequired("tzjuzgwyzmhtxo"); - model = BinaryData.fromObject(model).toObject(ConnectionState.class); - Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("xiebwwaloayqcg", model.description()); - Assertions.assertEquals("tzjuzgwyzmhtxo", model.actionsRequired()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainConfigurationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainConfigurationTests.java deleted file mode 100644 index 2fb65c47e272..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainConfigurationTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.CustomDomainConfiguration; -import com.azure.resourcemanager.eventgrid.models.CustomDomainIdentity; -import com.azure.resourcemanager.eventgrid.models.CustomDomainIdentityType; -import com.azure.resourcemanager.eventgrid.models.CustomDomainValidationState; -import org.junit.jupiter.api.Assertions; - -public final class CustomDomainConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomDomainConfiguration model = BinaryData.fromString( - "{\"fullyQualifiedDomainName\":\"ioilqukrydxtq\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"ggufhyaomtb\"},\"certificateUrl\":\"havgrvk\",\"expectedTxtRecordName\":\"ovjzhpjbibgjmfx\",\"expectedTxtRecordValue\":\"vfcluyovwxnbkfe\"}") - .toObject(CustomDomainConfiguration.class); - Assertions.assertEquals("ioilqukrydxtq", model.fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD, model.validationState()); - Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("ggufhyaomtb", model.identity().userAssignedIdentity()); - Assertions.assertEquals("havgrvk", model.certificateUrl()); - Assertions.assertEquals("ovjzhpjbibgjmfx", model.expectedTxtRecordName()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.expectedTxtRecordValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomainConfiguration model = new CustomDomainConfiguration().withFullyQualifiedDomainName("ioilqukrydxtq") - .withValidationState(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("ggufhyaomtb")) - .withCertificateUrl("havgrvk") - .withExpectedTxtRecordName("ovjzhpjbibgjmfx") - .withExpectedTxtRecordValue("vfcluyovwxnbkfe"); - model = BinaryData.fromObject(model).toObject(CustomDomainConfiguration.class); - Assertions.assertEquals("ioilqukrydxtq", model.fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD, model.validationState()); - Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("ggufhyaomtb", model.identity().userAssignedIdentity()); - Assertions.assertEquals("havgrvk", model.certificateUrl()); - Assertions.assertEquals("ovjzhpjbibgjmfx", model.expectedTxtRecordName()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.expectedTxtRecordValue()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainIdentityTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainIdentityTests.java deleted file mode 100644 index 133b4ac932c1..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainIdentityTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.CustomDomainIdentity; -import com.azure.resourcemanager.eventgrid.models.CustomDomainIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class CustomDomainIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomDomainIdentity model - = BinaryData.fromString("{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"cy\"}") - .toObject(CustomDomainIdentity.class); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("cy", model.userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomainIdentity model = new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("cy"); - model = BinaryData.fromObject(model).toObject(CustomDomainIdentity.class); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("cy", model.userAssignedIdentity()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainOwnershipValidationResultInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainOwnershipValidationResultInnerTests.java deleted file mode 100644 index 7245afc997de..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainOwnershipValidationResultInnerTests.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.CustomDomainOwnershipValidationResultInner; -import com.azure.resourcemanager.eventgrid.models.CustomDomainConfiguration; -import com.azure.resourcemanager.eventgrid.models.CustomDomainIdentity; -import com.azure.resourcemanager.eventgrid.models.CustomDomainIdentityType; -import com.azure.resourcemanager.eventgrid.models.CustomDomainValidationState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CustomDomainOwnershipValidationResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomDomainOwnershipValidationResultInner model = BinaryData.fromString( - "{\"customDomainsForTopicsConfiguration\":[{\"fullyQualifiedDomainName\":\"ohikkgqogjwpinde\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"hmedeilbjywfcfxz\"},\"certificateUrl\":\"zzihvwy\",\"expectedTxtRecordName\":\"suvjslcz\",\"expectedTxtRecordValue\":\"iid\"},{\"fullyQualifiedDomainName\":\"sllfryvdmvxad\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"awba\"},\"certificateUrl\":\"fbktyjmfczlf\",\"expectedTxtRecordName\":\"qkfrbzgowoxqmj\",\"expectedTxtRecordValue\":\"jcx\"}],\"customDomainsForTopicSpacesConfiguration\":[{\"fullyQualifiedDomainName\":\"gxhlusr\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"ceagbjqvlsumywz\"},\"certificateUrl\":\"hxgonoyjf\",\"expectedTxtRecordName\":\"puby\",\"expectedTxtRecordValue\":\"clkfkee\"}]}") - .toObject(CustomDomainOwnershipValidationResultInner.class); - Assertions.assertEquals("ohikkgqogjwpinde", - model.customDomainsForTopicsConfiguration().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.PENDING, - model.customDomainsForTopicsConfiguration().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, - model.customDomainsForTopicsConfiguration().get(0).identity().type()); - Assertions.assertEquals("hmedeilbjywfcfxz", - model.customDomainsForTopicsConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("zzihvwy", model.customDomainsForTopicsConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("suvjslcz", model.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("iid", model.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordValue()); - Assertions.assertEquals("gxhlusr", - model.customDomainsForTopicSpacesConfiguration().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.PENDING, - model.customDomainsForTopicSpacesConfiguration().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, - model.customDomainsForTopicSpacesConfiguration().get(0).identity().type()); - Assertions.assertEquals("ceagbjqvlsumywz", - model.customDomainsForTopicSpacesConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("hxgonoyjf", model.customDomainsForTopicSpacesConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("puby", - model.customDomainsForTopicSpacesConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("clkfkee", - model.customDomainsForTopicSpacesConfiguration().get(0).expectedTxtRecordValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomainOwnershipValidationResultInner model = new CustomDomainOwnershipValidationResultInner() - .withCustomDomainsForTopicsConfiguration(Arrays.asList( - new CustomDomainConfiguration().withFullyQualifiedDomainName("ohikkgqogjwpinde") - .withValidationState(CustomDomainValidationState.PENDING) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("hmedeilbjywfcfxz")) - .withCertificateUrl("zzihvwy") - .withExpectedTxtRecordName("suvjslcz") - .withExpectedTxtRecordValue("iid"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("sllfryvdmvxad") - .withValidationState(CustomDomainValidationState.PENDING) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("awba")) - .withCertificateUrl("fbktyjmfczlf") - .withExpectedTxtRecordName("qkfrbzgowoxqmj") - .withExpectedTxtRecordValue("jcx"))) - .withCustomDomainsForTopicSpacesConfiguration( - Arrays.asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("gxhlusr") - .withValidationState(CustomDomainValidationState.PENDING) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("ceagbjqvlsumywz")) - .withCertificateUrl("hxgonoyjf") - .withExpectedTxtRecordName("puby") - .withExpectedTxtRecordValue("clkfkee"))); - model = BinaryData.fromObject(model).toObject(CustomDomainOwnershipValidationResultInner.class); - Assertions.assertEquals("ohikkgqogjwpinde", - model.customDomainsForTopicsConfiguration().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.PENDING, - model.customDomainsForTopicsConfiguration().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, - model.customDomainsForTopicsConfiguration().get(0).identity().type()); - Assertions.assertEquals("hmedeilbjywfcfxz", - model.customDomainsForTopicsConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("zzihvwy", model.customDomainsForTopicsConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("suvjslcz", model.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("iid", model.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordValue()); - Assertions.assertEquals("gxhlusr", - model.customDomainsForTopicSpacesConfiguration().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.PENDING, - model.customDomainsForTopicSpacesConfiguration().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, - model.customDomainsForTopicSpacesConfiguration().get(0).identity().type()); - Assertions.assertEquals("ceagbjqvlsumywz", - model.customDomainsForTopicSpacesConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("hxgonoyjf", model.customDomainsForTopicSpacesConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("puby", - model.customDomainsForTopicSpacesConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("clkfkee", - model.customDomainsForTopicSpacesConfiguration().get(0).expectedTxtRecordValue()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomJwtAuthenticationManagedIdentityTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomJwtAuthenticationManagedIdentityTests.java deleted file mode 100644 index f92bcbd86ec0..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomJwtAuthenticationManagedIdentityTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationManagedIdentity; -import com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationManagedIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class CustomJwtAuthenticationManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomJwtAuthenticationManagedIdentity model - = BinaryData.fromString("{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"gz\"}") - .toObject(CustomJwtAuthenticationManagedIdentity.class); - Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("gz", model.userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomJwtAuthenticationManagedIdentity model = new CustomJwtAuthenticationManagedIdentity() - .withType(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("gz"); - model = BinaryData.fromObject(model).toObject(CustomJwtAuthenticationManagedIdentity.class); - Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("gz", model.userAssignedIdentity()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeadLetterDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeadLetterDestinationTests.java deleted file mode 100644 index b1193687817e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeadLetterDestinationTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeadLetterDestination; - -public final class DeadLetterDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeadLetterDestination model = BinaryData.fromString("{\"endpointType\":\"DeadLetterDestination\"}") - .toObject(DeadLetterDestination.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeadLetterDestination model = new DeadLetterDestination(); - model = BinaryData.fromObject(model).toObject(DeadLetterDestination.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeadLetterWithResourceIdentityTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeadLetterWithResourceIdentityTests.java deleted file mode 100644 index c7558a3f040c..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeadLetterWithResourceIdentityTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeadLetterDestination; -import com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class DeadLetterWithResourceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeadLetterWithResourceIdentity model = BinaryData.fromString( - "{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"r\"},\"deadLetterDestination\":{\"endpointType\":\"DeadLetterDestination\"}}") - .toObject(DeadLetterWithResourceIdentity.class); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("r", model.identity().userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeadLetterWithResourceIdentity model = new DeadLetterWithResourceIdentity() - .withIdentity(new EventSubscriptionIdentity().withType(EventSubscriptionIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("r")) - .withDeadLetterDestination(new DeadLetterDestination()); - model = BinaryData.fromObject(model).toObject(DeadLetterWithResourceIdentity.class); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("r", model.identity().userAssignedIdentity()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryAttributeListResultInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryAttributeListResultInnerTests.java deleted file mode 100644 index 3ffb5db04966..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryAttributeListResultInnerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.DeliveryAttributeListResultInner; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DeliveryAttributeListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeliveryAttributeListResultInner model = BinaryData.fromString( - "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"iolxor\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"lt\"}]}") - .toObject(DeliveryAttributeListResultInner.class); - Assertions.assertEquals("iolxor", model.value().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeliveryAttributeListResultInner model = new DeliveryAttributeListResultInner().withValue(Arrays - .asList(new DeliveryAttributeMapping().withName("iolxor"), new DeliveryAttributeMapping().withName("lt"))); - model = BinaryData.fromObject(model).toObject(DeliveryAttributeListResultInner.class); - Assertions.assertEquals("iolxor", model.value().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryAttributeMappingTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryAttributeMappingTests.java deleted file mode 100644 index ada0ed9eaad2..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryAttributeMappingTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import org.junit.jupiter.api.Assertions; - -public final class DeliveryAttributeMappingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeliveryAttributeMapping model - = BinaryData.fromString("{\"type\":\"DeliveryAttributeMapping\",\"name\":\"mncwsobqwcsdb\"}") - .toObject(DeliveryAttributeMapping.class); - Assertions.assertEquals("mncwsobqwcsdb", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeliveryAttributeMapping model = new DeliveryAttributeMapping().withName("mncwsobqwcsdb"); - model = BinaryData.fromObject(model).toObject(DeliveryAttributeMapping.class); - Assertions.assertEquals("mncwsobqwcsdb", model.name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryConfigurationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryConfigurationTests.java deleted file mode 100644 index 15cb6ecc009b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryConfigurationTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeadLetterDestination; -import com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity; -import com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration; -import com.azure.resourcemanager.eventgrid.models.DeliveryMode; -import com.azure.resourcemanager.eventgrid.models.DeliveryWithResourceIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionDestination; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentityType; -import com.azure.resourcemanager.eventgrid.models.PushInfo; -import com.azure.resourcemanager.eventgrid.models.QueueInfo; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class DeliveryConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeliveryConfiguration model = BinaryData.fromString( - "{\"deliveryMode\":\"Queue\",\"queue\":{\"receiveLockDurationInSeconds\":196443624,\"maxDeliveryCount\":1452791149,\"deadLetterDestinationWithResourceIdentity\":{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"zxkhnzbonlwnto\"},\"deadLetterDestination\":{\"endpointType\":\"DeadLetterDestination\"}},\"eventTimeToLive\":\"PT65H22M18S\"},\"push\":{\"maxDeliveryCount\":542586349,\"eventTimeToLive\":\"hksz\",\"deadLetterDestinationWithResourceIdentity\":{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"xztvbtqgsfraoyzk\"},\"deadLetterDestination\":{\"endpointType\":\"DeadLetterDestination\"}},\"deliveryWithResourceIdentity\":{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"guxawqaldsyuuxi\"},\"destination\":{\"endpointType\":\"EventSubscriptionDestination\"}},\"destination\":{\"endpointType\":\"EventSubscriptionDestination\"}}}") - .toObject(DeliveryConfiguration.class); - Assertions.assertEquals(DeliveryMode.QUEUE, model.deliveryMode()); - Assertions.assertEquals(196443624, model.queue().receiveLockDurationInSeconds()); - Assertions.assertEquals(1452791149, model.queue().maxDeliveryCount()); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, - model.queue().deadLetterDestinationWithResourceIdentity().identity().type()); - Assertions.assertEquals("zxkhnzbonlwnto", - model.queue().deadLetterDestinationWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals(Duration.parse("PT65H22M18S"), model.queue().eventTimeToLive()); - Assertions.assertEquals(542586349, model.push().maxDeliveryCount()); - Assertions.assertEquals("hksz", model.push().eventTimeToLive()); - Assertions.assertEquals(EventSubscriptionIdentityType.USER_ASSIGNED, - model.push().deadLetterDestinationWithResourceIdentity().identity().type()); - Assertions.assertEquals("xztvbtqgsfraoyzk", - model.push().deadLetterDestinationWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals(EventSubscriptionIdentityType.USER_ASSIGNED, - model.push().deliveryWithResourceIdentity().identity().type()); - Assertions.assertEquals("guxawqaldsyuuxi", - model.push().deliveryWithResourceIdentity().identity().userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeliveryConfiguration model = new DeliveryConfiguration().withDeliveryMode(DeliveryMode.QUEUE) - .withQueue(new QueueInfo().withReceiveLockDurationInSeconds(196443624) - .withMaxDeliveryCount(1452791149) - .withDeadLetterDestinationWithResourceIdentity(new DeadLetterWithResourceIdentity() - .withIdentity( - new EventSubscriptionIdentity().withType(EventSubscriptionIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("zxkhnzbonlwnto")) - .withDeadLetterDestination(new DeadLetterDestination())) - .withEventTimeToLive(Duration.parse("PT65H22M18S"))) - .withPush(new PushInfo().withMaxDeliveryCount(542586349) - .withEventTimeToLive("hksz") - .withDeadLetterDestinationWithResourceIdentity(new DeadLetterWithResourceIdentity() - .withIdentity(new EventSubscriptionIdentity().withType(EventSubscriptionIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("xztvbtqgsfraoyzk")) - .withDeadLetterDestination(new DeadLetterDestination())) - .withDeliveryWithResourceIdentity(new DeliveryWithResourceIdentity() - .withIdentity(new EventSubscriptionIdentity().withType(EventSubscriptionIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("guxawqaldsyuuxi")) - .withDestination(new EventSubscriptionDestination())) - .withDestination(new EventSubscriptionDestination())); - model = BinaryData.fromObject(model).toObject(DeliveryConfiguration.class); - Assertions.assertEquals(DeliveryMode.QUEUE, model.deliveryMode()); - Assertions.assertEquals(196443624, model.queue().receiveLockDurationInSeconds()); - Assertions.assertEquals(1452791149, model.queue().maxDeliveryCount()); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, - model.queue().deadLetterDestinationWithResourceIdentity().identity().type()); - Assertions.assertEquals("zxkhnzbonlwnto", - model.queue().deadLetterDestinationWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals(Duration.parse("PT65H22M18S"), model.queue().eventTimeToLive()); - Assertions.assertEquals(542586349, model.push().maxDeliveryCount()); - Assertions.assertEquals("hksz", model.push().eventTimeToLive()); - Assertions.assertEquals(EventSubscriptionIdentityType.USER_ASSIGNED, - model.push().deadLetterDestinationWithResourceIdentity().identity().type()); - Assertions.assertEquals("xztvbtqgsfraoyzk", - model.push().deadLetterDestinationWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals(EventSubscriptionIdentityType.USER_ASSIGNED, - model.push().deliveryWithResourceIdentity().identity().type()); - Assertions.assertEquals("guxawqaldsyuuxi", - model.push().deliveryWithResourceIdentity().identity().userAssignedIdentity()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryWithResourceIdentityTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryWithResourceIdentityTests.java deleted file mode 100644 index f6408d341476..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryWithResourceIdentityTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeliveryWithResourceIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionDestination; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class DeliveryWithResourceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeliveryWithResourceIdentity model = BinaryData.fromString( - "{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"dgrtwaenuuzkopbm\"},\"destination\":{\"endpointType\":\"EventSubscriptionDestination\"}}") - .toObject(DeliveryWithResourceIdentity.class); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dgrtwaenuuzkopbm", model.identity().userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeliveryWithResourceIdentity model = new DeliveryWithResourceIdentity() - .withIdentity(new EventSubscriptionIdentity().withType(EventSubscriptionIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("dgrtwaenuuzkopbm")) - .withDestination(new EventSubscriptionDestination()); - model = BinaryData.fromObject(model).toObject(DeliveryWithResourceIdentity.class); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dgrtwaenuuzkopbm", model.identity().userAssignedIdentity()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteMockTests.java deleted file mode 100644 index 9462a95478e3..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainEventSubscriptionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.domainEventSubscriptions() - .delete("jmspugzfeuzjlj", "phfky", "zolgjzmicuydocc", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java deleted file mode 100644 index 5cfd5c009971..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeListResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainEventSubscriptionsGetDeliveryAttributesWithResponseMockTests { - @Test - public void testGetDeliveryAttributesWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"kipfsdyepf\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"cmbezac\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ztgaz\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"qejg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeliveryAttributeListResult response = manager.domainEventSubscriptions() - .getDeliveryAttributesWithResponse("vkolrupjovmo", "sayebra", "wzlpzbtz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("kipfsdyepf", response.value().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlWithResponseMockTests.java deleted file mode 100644 index 2a93781e3109..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainEventSubscriptionsGetFullUrlWithResponseMockTests { - @Test - public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"iinj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EventSubscriptionFullUrl response = manager.domainEventSubscriptions() - .getFullUrlWithResponse("xshanzb", "iadhbatec", "atsdohzniucbdaom", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("iinj", response.endpointUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainInnerTests.java deleted file mode 100644 index 7192c79ef767..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainInnerTests.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.DomainInner; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceSku; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DomainInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DomainInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"uzoqft\"},\"groupIds\":[\"zrnkcqvyxlwh\",\"lsicohoqqnwv\",\"ryavwhheunmmqh\",\"yxzk\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"koklya\",\"actionsRequired\":\"conuqszfkbeype\"},\"provisioningState\":\"Failed\"},\"id\":\"jmwvvj\",\"name\":\"kt\",\"type\":\"xsenhwlr\"}],\"provisioningState\":\"Failed\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"wvlqdqgb\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"phxepcyvahf\":{\"description\":\"tcktvfcivfsnky\",\"displayName\":\"ctq\",\"documentationUrl\":\"fbebrjcxer\",\"dataSchemaUrl\":\"wutttxfvjrbi\"},\"sncghkjeszz\":{\"description\":\"jky\",\"displayName\":\"j\",\"documentationUrl\":\"ujqgidok\",\"dataSchemaUrl\":\"ljyoxgvcltb\"},\"gr\":{\"description\":\"ijhtxf\",\"displayName\":\"xbf\",\"documentationUrl\":\"xnehmpvec\",\"dataSchemaUrl\":\"odebfqkkrbmpu\"},\"ynhijggme\":{\"description\":\"flz\",\"displayName\":\"bxzpuzycisp\",\"documentationUrl\":\"zahmgkbrpyydhibn\",\"dataSchemaUrl\":\"qkpikadrgvtqagnb\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"iarbutrcvpna\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"unmpxttd\",\"action\":\"Allow\"},{\"ipMask\":\"nlankxmyskpb\",\"action\":\"Allow\"},{\"ipMask\":\"tkcxywnytnrsy\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"dbabp\",\"tenantId\":\"wrqlfktsthsuco\",\"userAssignedIdentities\":{\"fey\":{\"principalId\":\"yazttbtwwrqpue\",\"clientId\":\"kzywbiex\"},\"zjancuxr\":{\"principalId\":\"axibxujw\",\"clientId\":\"qwalmuzyoxaepd\"},\"dbpgnxytxhp\":{\"principalId\":\"wbavxbniwdj\",\"clientId\":\"zt\"},\"wtctyqi\":{\"principalId\":\"bzpfzab\",\"clientId\":\"cuh\"}}},\"location\":\"bbovplwzbhvgyugu\",\"tags\":{\"sxnkjzkdeslpvlo\":\"mkfssxqukkfplgm\",\"baiuebbaumny\":\"wiyighxpkdw\",\"txp\":\"upedeojnabckhs\"},\"id\":\"ie\",\"name\":\"tfhvpesapskrdqmh\",\"type\":\"jdhtldwkyzxu\"}") - .toObject(DomainInner.class); - Assertions.assertEquals("bbovplwzbhvgyugu", model.location()); - Assertions.assertEquals("mkfssxqukkfplgm", model.tags().get("sxnkjzkdeslpvlo")); - Assertions.assertEquals(Sku.PREMIUM, model.sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dbabp", model.identity().principalId()); - Assertions.assertEquals("wrqlfktsthsuco", model.identity().tenantId()); - Assertions.assertEquals("yazttbtwwrqpue", model.identity().userAssignedIdentities().get("fey").principalId()); - Assertions.assertEquals("kzywbiex", model.identity().userAssignedIdentities().get("fey").clientId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("tcktvfcivfsnky", - model.eventTypeInfo().inlineEventTypes().get("phxepcyvahf").description()); - Assertions.assertEquals("ctq", model.eventTypeInfo().inlineEventTypes().get("phxepcyvahf").displayName()); - Assertions.assertEquals("fbebrjcxer", - model.eventTypeInfo().inlineEventTypes().get("phxepcyvahf").documentationUrl()); - Assertions.assertEquals("wutttxfvjrbi", - model.eventTypeInfo().inlineEventTypes().get("phxepcyvahf").dataSchemaUrl()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("unmpxttd", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(false, model.autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(false, model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DomainInner model = new DomainInner().withLocation("bbovplwzbhvgyugu") - .withTags( - mapOf("sxnkjzkdeslpvlo", "mkfssxqukkfplgm", "baiuebbaumny", "wiyighxpkdw", "txp", "upedeojnabckhs")) - .withSku(new ResourceSku().withName(Sku.PREMIUM)) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("dbabp") - .withTenantId("wrqlfktsthsuco") - .withUserAssignedIdentities(mapOf("fey", - new UserIdentityProperties().withPrincipalId("yazttbtwwrqpue").withClientId("kzywbiex"), "zjancuxr", - new UserIdentityProperties().withPrincipalId("axibxujw").withClientId("qwalmuzyoxaepd"), - "dbpgnxytxhp", new UserIdentityProperties().withPrincipalId("wbavxbniwdj").withClientId("zt"), - "wtctyqi", new UserIdentityProperties().withPrincipalId("bzpfzab").withClientId("cuh")))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withInputSchema(InputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("phxepcyvahf", - new InlineEventProperties().withDescription("tcktvfcivfsnky") - .withDisplayName("ctq") - .withDocumentationUrl("fbebrjcxer") - .withDataSchemaUrl("wutttxfvjrbi"), - "sncghkjeszz", - new InlineEventProperties().withDescription("jky") - .withDisplayName("j") - .withDocumentationUrl("ujqgidok") - .withDataSchemaUrl("ljyoxgvcltb"), - "gr", - new InlineEventProperties().withDescription("ijhtxf") - .withDisplayName("xbf") - .withDocumentationUrl("xnehmpvec") - .withDataSchemaUrl("odebfqkkrbmpu"), - "ynhijggme", - new InlineEventProperties().withDescription("flz") - .withDisplayName("bxzpuzycisp") - .withDocumentationUrl("zahmgkbrpyydhibn") - .withDataSchemaUrl("qkpikadrgvtqagnb")))) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("unmpxttd").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("nlankxmyskpb").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("tkcxywnytnrsy").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withAutoCreateTopicWithFirstSubscription(false) - .withAutoDeleteTopicWithLastSubscription(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR); - model = BinaryData.fromObject(model).toObject(DomainInner.class); - Assertions.assertEquals("bbovplwzbhvgyugu", model.location()); - Assertions.assertEquals("mkfssxqukkfplgm", model.tags().get("sxnkjzkdeslpvlo")); - Assertions.assertEquals(Sku.PREMIUM, model.sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dbabp", model.identity().principalId()); - Assertions.assertEquals("wrqlfktsthsuco", model.identity().tenantId()); - Assertions.assertEquals("yazttbtwwrqpue", model.identity().userAssignedIdentities().get("fey").principalId()); - Assertions.assertEquals("kzywbiex", model.identity().userAssignedIdentities().get("fey").clientId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("tcktvfcivfsnky", - model.eventTypeInfo().inlineEventTypes().get("phxepcyvahf").description()); - Assertions.assertEquals("ctq", model.eventTypeInfo().inlineEventTypes().get("phxepcyvahf").displayName()); - Assertions.assertEquals("fbebrjcxer", - model.eventTypeInfo().inlineEventTypes().get("phxepcyvahf").documentationUrl()); - Assertions.assertEquals("wutttxfvjrbi", - model.eventTypeInfo().inlineEventTypes().get("phxepcyvahf").dataSchemaUrl()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("unmpxttd", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(false, model.autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(false, model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainPropertiesTests.java deleted file mode 100644 index 61b497d1a09e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainPropertiesTests.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.DomainProperties; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DomainPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DomainProperties model = BinaryData.fromString( - "{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"scwsv\"},\"groupIds\":[\"togt\",\"rupqsxvnmicy\",\"vce\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ovnotyfjfcnjbkcn\",\"actionsRequired\":\"hbttkphyw\"},\"provisioningState\":\"Failed\"},\"id\":\"jtoqne\",\"name\":\"mclfplphoxuscr\",\"type\":\"abgy\"}],\"provisioningState\":\"Updating\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"azqugxywpmueefj\",\"inputSchema\":\"EventGridSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"hdzhlrqj\":{\"description\":\"dsuyonobgla\",\"displayName\":\"qxtccmgyudx\",\"documentationUrl\":\"lmoyrx\",\"dataSchemaUrl\":\"fudwpznt\"},\"seyvj\":{\"description\":\"ck\",\"displayName\":\"lhrxsbkyvpyc\",\"documentationUrl\":\"uzbpzkafku\",\"dataSchemaUrl\":\"crnwbmeh\"},\"dhmdua\":{\"description\":\"rts\",\"displayName\":\"spkdee\",\"documentationUrl\":\"ofmxagkvtmelmqkr\",\"dataSchemaUrl\":\"hvljuahaquh\"},\"zlfmisgwbnbbeld\":{\"description\":\"exq\",\"displayName\":\"fadmws\",\"documentationUrl\":\"r\",\"dataSchemaUrl\":\"xpvgo\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"zbaliourqha\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"hsfwxosowzxcug\",\"action\":\"Allow\"},{\"ipMask\":\"oxdjebwpuc\",\"action\":\"Allow\"},{\"ipMask\":\"ovbvmeueciv\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":true,\"autoDeleteTopicWithLastSubscription\":true,\"dataResidencyBoundary\":\"WithinGeopair\"}") - .toObject(DomainProperties.class); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.EVENT_GRID_SCHEMA, model.inputSchema()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("dsuyonobgla", model.eventTypeInfo().inlineEventTypes().get("hdzhlrqj").description()); - Assertions.assertEquals("qxtccmgyudx", model.eventTypeInfo().inlineEventTypes().get("hdzhlrqj").displayName()); - Assertions.assertEquals("lmoyrx", model.eventTypeInfo().inlineEventTypes().get("hdzhlrqj").documentationUrl()); - Assertions.assertEquals("fudwpznt", model.eventTypeInfo().inlineEventTypes().get("hdzhlrqj").dataSchemaUrl()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("hsfwxosowzxcug", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(true, model.autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(true, model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DomainProperties model = new DomainProperties().withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withInputSchema(InputSchema.EVENT_GRID_SCHEMA) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("hdzhlrqj", - new InlineEventProperties().withDescription("dsuyonobgla") - .withDisplayName("qxtccmgyudx") - .withDocumentationUrl("lmoyrx") - .withDataSchemaUrl("fudwpznt"), - "seyvj", - new InlineEventProperties().withDescription("ck") - .withDisplayName("lhrxsbkyvpyc") - .withDocumentationUrl("uzbpzkafku") - .withDataSchemaUrl("crnwbmeh"), - "dhmdua", - new InlineEventProperties().withDescription("rts") - .withDisplayName("spkdee") - .withDocumentationUrl("ofmxagkvtmelmqkr") - .withDataSchemaUrl("hvljuahaquh"), - "zlfmisgwbnbbeld", - new InlineEventProperties().withDescription("exq") - .withDisplayName("fadmws") - .withDocumentationUrl("r") - .withDataSchemaUrl("xpvgo")))) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("hsfwxosowzxcug").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("oxdjebwpuc").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("ovbvmeueciv").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withAutoCreateTopicWithFirstSubscription(true) - .withAutoDeleteTopicWithLastSubscription(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR); - model = BinaryData.fromObject(model).toObject(DomainProperties.class); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.EVENT_GRID_SCHEMA, model.inputSchema()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("dsuyonobgla", model.eventTypeInfo().inlineEventTypes().get("hdzhlrqj").description()); - Assertions.assertEquals("qxtccmgyudx", model.eventTypeInfo().inlineEventTypes().get("hdzhlrqj").displayName()); - Assertions.assertEquals("lmoyrx", model.eventTypeInfo().inlineEventTypes().get("hdzhlrqj").documentationUrl()); - Assertions.assertEquals("fudwpznt", model.eventTypeInfo().inlineEventTypes().get("hdzhlrqj").dataSchemaUrl()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("hsfwxosowzxcug", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(true, model.autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(true, model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteMockTests.java deleted file mode 100644 index 2769512abadc..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainTopicEventSubscriptionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.domainTopicEventSubscriptions().delete("ph", "yv", "jw", "w", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java deleted file mode 100644 index 894d769cf414..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeListResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests { - @Test - public void testGetDeliveryAttributesWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"iraabmdlqjbedpf\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"lhupmomihzbdnpxp\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"dpr\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"xelyicghflr\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeliveryAttributeListResult response = manager.domainTopicEventSubscriptions() - .getDeliveryAttributesWithResponse("hxjxjoezlqxrkdkn", "obektmbozo", "tzamicbig", "cdgzseznux", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("iraabmdlqjbedpf", response.value().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java deleted file mode 100644 index 06e597c31e4e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainTopicEventSubscriptionsGetFullUrlWithResponseMockTests { - @Test - public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"hwilz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EventSubscriptionFullUrl response = manager.domainTopicEventSubscriptions() - .getFullUrlWithResponse("qsratjhd", "zybspijhfrzgdkk", "gv", "ukhsusmmorf", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hwilz", response.endpointUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicInnerTests.java deleted file mode 100644 index 6564b9a48ecf..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.DomainTopicInner; - -public final class DomainTopicInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DomainTopicInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"oakggkfpag\",\"name\":\"owpulpq\",\"type\":\"lyls\"}") - .toObject(DomainTopicInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DomainTopicInner model = new DomainTopicInner(); - model = BinaryData.fromObject(model).toObject(DomainTopicInner.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicPropertiesTests.java deleted file mode 100644 index 2e1c754cb3d9..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.DomainTopicProperties; - -public final class DomainTopicPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DomainTopicProperties model - = BinaryData.fromString("{\"provisioningState\":\"Updating\"}").toObject(DomainTopicProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DomainTopicProperties model = new DomainTopicProperties(); - model = BinaryData.fromObject(model).toObject(DomainTopicProperties.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteMockTests.java deleted file mode 100644 index 75ee11af7b9a..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainTopicsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.domainTopics().delete("lpcqydeykvskic", "dfrjeizik", "qaboohxbms", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetWithResponseMockTests.java deleted file mode 100644 index 33fae31ce920..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DomainTopic; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainTopicsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"ot\",\"name\":\"riyrgkoekvz\",\"type\":\"xxyxhighctxbxm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DomainTopic response = manager.domainTopics() - .getWithResponse("mhmnulwemp", "cifrhjulrsulwzpf", "usnaw", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainMockTests.java deleted file mode 100644 index 801a2cdaa48b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DomainTopic; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainTopicsListByDomainMockTests { - @Test - public void testListByDomain() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"gejkbvhh\",\"name\":\"aurghooxa\",\"type\":\"xb\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.domainTopics().listByDomain("ycqsxr", "d", "ewuyqa", 673654940, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListResultTests.java deleted file mode 100644 index 0fd5e121fc52..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListResultTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.DomainTopicInner; -import com.azure.resourcemanager.eventgrid.models.DomainTopicsListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DomainTopicsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DomainTopicsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\"},\"id\":\"r\",\"name\":\"tiagx\",\"type\":\"dszue\"},{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"kfzbeyvpnqicvi\",\"name\":\"v\",\"type\":\"jjxd\"},{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"kzclewyh\",\"name\":\"lw\",\"type\":\"aztz\"},{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"ckw\",\"name\":\"fz\",\"type\":\"whxxbuyqax\"}],\"nextLink\":\"eqz\"}") - .toObject(DomainTopicsListResult.class); - Assertions.assertEquals("eqz", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DomainTopicsListResult model = new DomainTopicsListResult().withValue(Arrays.asList(new DomainTopicInner(), - new DomainTopicInner(), new DomainTopicInner(), new DomainTopicInner())).withNextLink("eqz"); - model = BinaryData.fromObject(model).toObject(DomainTopicsListResult.class); - Assertions.assertEquals("eqz", model.nextLink()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainUpdateParameterPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainUpdateParameterPropertiesTests.java deleted file mode 100644 index 3b9b90838bf2..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainUpdateParameterPropertiesTests.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.DomainUpdateParameterProperties; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DomainUpdateParameterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DomainUpdateParameterProperties model = BinaryData.fromString( - "{\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"ytkblmpew\",\"action\":\"Allow\"},{\"ipMask\":\"krvrns\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.1\",\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":true,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinGeopair\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"znfqqnvwpmqtar\":{\"description\":\"uvwbhsqfs\",\"displayName\":\"cgjbirxbp\",\"documentationUrl\":\"srfbjfdtwss\",\"dataSchemaUrl\":\"ftpvjzbexil\"},\"enq\":{\"description\":\"ujmkcjhwqy\",\"displayName\":\"r\",\"documentationUrl\":\"n\",\"dataSchemaUrl\":\"ewgdrjervn\"},\"qolbgyc\":{\"description\":\"hin\",\"displayName\":\"ygmi\",\"documentationUrl\":\"hnzdndslgnayqi\",\"dataSchemaUrl\":\"nduhavhqlkthum\"}}}}") - .toObject(DomainUpdateParameterProperties.class); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("ytkblmpew", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(true, model.autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(false, model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("uvwbhsqfs", - model.eventTypeInfo().inlineEventTypes().get("znfqqnvwpmqtar").description()); - Assertions.assertEquals("cgjbirxbp", - model.eventTypeInfo().inlineEventTypes().get("znfqqnvwpmqtar").displayName()); - Assertions.assertEquals("srfbjfdtwss", - model.eventTypeInfo().inlineEventTypes().get("znfqqnvwpmqtar").documentationUrl()); - Assertions.assertEquals("ftpvjzbexil", - model.eventTypeInfo().inlineEventTypes().get("znfqqnvwpmqtar").dataSchemaUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DomainUpdateParameterProperties model - = new DomainUpdateParameterProperties().withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("ytkblmpew").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("krvrns").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) - .withDisableLocalAuth(false) - .withAutoCreateTopicWithFirstSubscription(true) - .withAutoDeleteTopicWithLastSubscription(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("znfqqnvwpmqtar", - new InlineEventProperties().withDescription("uvwbhsqfs") - .withDisplayName("cgjbirxbp") - .withDocumentationUrl("srfbjfdtwss") - .withDataSchemaUrl("ftpvjzbexil"), - "enq", - new InlineEventProperties().withDescription("ujmkcjhwqy") - .withDisplayName("r") - .withDocumentationUrl("n") - .withDataSchemaUrl("ewgdrjervn"), - "qolbgyc", - new InlineEventProperties().withDescription("hin") - .withDisplayName("ygmi") - .withDocumentationUrl("hnzdndslgnayqi") - .withDataSchemaUrl("nduhavhqlkthum")))); - model = BinaryData.fromObject(model).toObject(DomainUpdateParameterProperties.class); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("ytkblmpew", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(true, model.autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(false, model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("uvwbhsqfs", - model.eventTypeInfo().inlineEventTypes().get("znfqqnvwpmqtar").description()); - Assertions.assertEquals("cgjbirxbp", - model.eventTypeInfo().inlineEventTypes().get("znfqqnvwpmqtar").displayName()); - Assertions.assertEquals("srfbjfdtwss", - model.eventTypeInfo().inlineEventTypes().get("znfqqnvwpmqtar").documentationUrl()); - Assertions.assertEquals("ftpvjzbexil", - model.eventTypeInfo().inlineEventTypes().get("znfqqnvwpmqtar").dataSchemaUrl()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainUpdateParametersTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainUpdateParametersTests.java deleted file mode 100644 index b27ad1e2a8dc..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainUpdateParametersTests.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.DomainUpdateParameters; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceSku; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DomainUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DomainUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"bbtdzumvee\":\"uaejxdultsk\",\"zuhkfpbsjyof\":\"gpw\"},\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"ttouwaboekqvkel\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.0\",\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":true,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinGeopair\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"aulppggd\":{\"description\":\"jixisxyawjoyaqcs\",\"displayName\":\"jpkiidzyexznelix\",\"documentationUrl\":\"rzt\",\"dataSchemaUrl\":\"lhbnxkna\"},\"trmgucnapkte\":{\"description\":\"napnyiropuhpigv\",\"displayName\":\"ylgqgitxmedjvcsl\",\"documentationUrl\":\"qwwncw\",\"dataSchemaUrl\":\"hxg\"},\"lzdahzxctobgbkdm\":{\"description\":\"llwptfdy\",\"displayName\":\"fqbuaceopzf\",\"documentationUrl\":\"hhuao\",\"dataSchemaUrl\":\"pcqeqx\"}}}},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"stmgrcfbunrmfqjh\",\"tenantId\":\"xbpvjymjhx\",\"userAssignedIdentities\":{\"uvjfdxxive\":{\"principalId\":\"gudivkrtswbxqz\",\"clientId\":\"zjf\"},\"wvxysl\":{\"principalId\":\"t\",\"clientId\":\"aqtdoqmcbx\"}}},\"sku\":{\"name\":\"Basic\"}}") - .toObject(DomainUpdateParameters.class); - Assertions.assertEquals("uaejxdultsk", model.tags().get("bbtdzumvee")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("stmgrcfbunrmfqjh", model.identity().principalId()); - Assertions.assertEquals("xbpvjymjhx", model.identity().tenantId()); - Assertions.assertEquals("gudivkrtswbxqz", - model.identity().userAssignedIdentities().get("uvjfdxxive").principalId()); - Assertions.assertEquals("zjf", model.identity().userAssignedIdentities().get("uvjfdxxive").clientId()); - Assertions.assertEquals(Sku.BASIC, model.sku().name()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("ttouwaboekqvkel", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(true, model.autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(false, model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("jixisxyawjoyaqcs", - model.eventTypeInfo().inlineEventTypes().get("aulppggd").description()); - Assertions.assertEquals("jpkiidzyexznelix", - model.eventTypeInfo().inlineEventTypes().get("aulppggd").displayName()); - Assertions.assertEquals("rzt", model.eventTypeInfo().inlineEventTypes().get("aulppggd").documentationUrl()); - Assertions.assertEquals("lhbnxkna", model.eventTypeInfo().inlineEventTypes().get("aulppggd").dataSchemaUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DomainUpdateParameters model - = new DomainUpdateParameters().withTags(mapOf("bbtdzumvee", "uaejxdultsk", "zuhkfpbsjyof", "gpw")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("stmgrcfbunrmfqjh") - .withTenantId("xbpvjymjhx") - .withUserAssignedIdentities(mapOf("uvjfdxxive", - new UserIdentityProperties().withPrincipalId("gudivkrtswbxqz").withClientId("zjf"), "wvxysl", - new UserIdentityProperties().withPrincipalId("t").withClientId("aqtdoqmcbx")))) - .withSku(new ResourceSku().withName(Sku.BASIC)) - .withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("ttouwaboekqvkel").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withDisableLocalAuth(true) - .withAutoCreateTopicWithFirstSubscription(true) - .withAutoDeleteTopicWithLastSubscription(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("aulppggd", - new InlineEventProperties().withDescription("jixisxyawjoyaqcs") - .withDisplayName("jpkiidzyexznelix") - .withDocumentationUrl("rzt") - .withDataSchemaUrl("lhbnxkna"), - "trmgucnapkte", - new InlineEventProperties().withDescription("napnyiropuhpigv") - .withDisplayName("ylgqgitxmedjvcsl") - .withDocumentationUrl("qwwncw") - .withDataSchemaUrl("hxg"), - "lzdahzxctobgbkdm", - new InlineEventProperties().withDescription("llwptfdy") - .withDisplayName("fqbuaceopzf") - .withDocumentationUrl("hhuao") - .withDataSchemaUrl("pcqeqx")))); - model = BinaryData.fromObject(model).toObject(DomainUpdateParameters.class); - Assertions.assertEquals("uaejxdultsk", model.tags().get("bbtdzumvee")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("stmgrcfbunrmfqjh", model.identity().principalId()); - Assertions.assertEquals("xbpvjymjhx", model.identity().tenantId()); - Assertions.assertEquals("gudivkrtswbxqz", - model.identity().userAssignedIdentities().get("uvjfdxxive").principalId()); - Assertions.assertEquals("zjf", model.identity().userAssignedIdentities().get("uvjfdxxive").clientId()); - Assertions.assertEquals(Sku.BASIC, model.sku().name()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("ttouwaboekqvkel", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(true, model.autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(false, model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("jixisxyawjoyaqcs", - model.eventTypeInfo().inlineEventTypes().get("aulppggd").description()); - Assertions.assertEquals("jpkiidzyexznelix", - model.eventTypeInfo().inlineEventTypes().get("aulppggd").displayName()); - Assertions.assertEquals("rzt", model.eventTypeInfo().inlineEventTypes().get("aulppggd").documentationUrl()); - Assertions.assertEquals("lhbnxkna", model.eventTypeInfo().inlineEventTypes().get("aulppggd").dataSchemaUrl()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteMockTests.java deleted file mode 100644 index 42739ae3b324..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.domains().delete("wxdchpojxlehzlx", "gfquwz", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 4e4a06128119..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.Domain; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"ezslp\",\"xgcbdsvalpnpt\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"xgpazwugxyqv\",\"name\":\"jo\",\"type\":\"felhldiuhzzgqlm\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"giudjpxpq\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"hnmhkrezsdsux\",\"name\":\"eqdgcruxsp\",\"type\":\"nymmqgwokmikpa\"}],\"provisioningState\":\"Failed\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"uvjipfd\",\"inputSchema\":\"CustomEventSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"cihmbfntumeezbxv\":{\"description\":\"ehpphthdklmveta\",\"displayName\":\"akfqoixwgiksb\",\"documentationUrl\":\"tooxrpog\",\"dataSchemaUrl\":\"hchgjtnhtukf\"},\"pwwztjfmkkhtgf\":{\"description\":\"bnuvwcg\",\"displayName\":\"gomtm\",\"documentationUrl\":\"wxuq\",\"dataSchemaUrl\":\"vs\"},\"comlyotgkwsx\":{\"description\":\"dmlsc\",\"displayName\":\"ll\",\"documentationUrl\":\"na\",\"dataSchemaUrl\":\"jowazhpab\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"qor\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"c\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"jkedwqurcgojmrv\",\"tenantId\":\"wjongzs\",\"userAssignedIdentities\":{\"gv\":{\"principalId\":\"rsilcchskxxkansb\",\"clientId\":\"ia\"},\"hxlyubqjrostvrje\":{\"principalId\":\"jrulfucte\",\"clientId\":\"thcfj\"}}},\"location\":\"tzzbeq\",\"tags\":{\"srwrsnrhpqati\":\"rxalxrdha\"},\"id\":\"kkvyanxk\",\"name\":\"vcsemsvuvdj\",\"type\":\"qxetqmmlivrjjx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Domain response = manager.domains() - .getByResourceGroupWithResponse("jcvbxqlapsns", "ovyxpavidnie", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tzzbeq", response.location()); - Assertions.assertEquals("rxalxrdha", response.tags().get("srwrsnrhpqati")); - Assertions.assertEquals(Sku.BASIC, response.sku().name()); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("jkedwqurcgojmrv", response.identity().principalId()); - Assertions.assertEquals("wjongzs", response.identity().tenantId()); - Assertions.assertEquals("rsilcchskxxkansb", - response.identity().userAssignedIdentities().get("gv").principalId()); - Assertions.assertEquals("ia", response.identity().userAssignedIdentities().get("gv").clientId()); - Assertions.assertEquals(TlsVersion.ONE_ONE, response.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CUSTOM_EVENT_SCHEMA, response.inputSchema()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("ehpphthdklmveta", - response.eventTypeInfo().inlineEventTypes().get("cihmbfntumeezbxv").description()); - Assertions.assertEquals("akfqoixwgiksb", - response.eventTypeInfo().inlineEventTypes().get("cihmbfntumeezbxv").displayName()); - Assertions.assertEquals("tooxrpog", - response.eventTypeInfo().inlineEventTypes().get("cihmbfntumeezbxv").documentationUrl()); - Assertions.assertEquals("hchgjtnhtukf", - response.eventTypeInfo().inlineEventTypes().get("cihmbfntumeezbxv").dataSchemaUrl()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, response.publicNetworkAccess()); - Assertions.assertEquals("c", response.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.inboundIpRules().get(0).action()); - Assertions.assertEquals(true, response.disableLocalAuth()); - Assertions.assertEquals(false, response.autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(false, response.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, response.dataResidencyBoundary()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupMockTests.java deleted file mode 100644 index 6fc65c00b818..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.Domain; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"tbrekqhsqhtf\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"byejuwyqwdqigm\",\"name\":\"hg\",\"type\":\"nztxlujkh\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"nkfm\",\"h\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"mlm\",\"name\":\"jnqtqe\",\"type\":\"hj\"}],\"provisioningState\":\"Failed\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"pok\",\"inputSchema\":\"CustomEventSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"dxaexqokmyrljia\":{\"description\":\"guavtptb\",\"displayName\":\"wkqyns\",\"documentationUrl\":\"bvoffb\",\"dataSchemaUrl\":\"w\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"nobrqlpb\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"uyudivbxnhsq\",\"action\":\"Allow\"},{\"ipMask\":\"nqelwgdhuru\",\"action\":\"Allow\"},{\"ipMask\":\"arogatmolji\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":true,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"rknsjulug\",\"tenantId\":\"bnhrxlelfjhkeiz\",\"userAssignedIdentities\":{\"surlgwq\":{\"principalId\":\"tdmiwjekptyca\",\"clientId\":\"bjzcqymlcfnzhm\"}}},\"location\":\"mmzp\",\"tags\":{\"lawiubmomsgvvjhv\":\"u\",\"q\":\"lrlohewjjmajnkdf\"},\"id\":\"onswae\",\"name\":\"kzfzqxjosho\",\"type\":\"totryegpkhxrme\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.domains().listByResourceGroup("jj", "h", 505679994, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mmzp", response.iterator().next().location()); - Assertions.assertEquals("u", response.iterator().next().tags().get("lawiubmomsgvvjhv")); - Assertions.assertEquals(Sku.BASIC, response.iterator().next().sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("rknsjulug", response.iterator().next().identity().principalId()); - Assertions.assertEquals("bnhrxlelfjhkeiz", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("tdmiwjekptyca", - response.iterator().next().identity().userAssignedIdentities().get("surlgwq").principalId()); - Assertions.assertEquals("bjzcqymlcfnzhm", - response.iterator().next().identity().userAssignedIdentities().get("surlgwq").clientId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, response.iterator().next().minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CUSTOM_EVENT_SCHEMA, response.iterator().next().inputSchema()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.iterator().next().eventTypeInfo().kind()); - Assertions.assertEquals("guavtptb", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("dxaexqokmyrljia").description()); - Assertions.assertEquals("wkqyns", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("dxaexqokmyrljia").displayName()); - Assertions.assertEquals("bvoffb", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("dxaexqokmyrljia").documentationUrl()); - Assertions.assertEquals("w", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("dxaexqokmyrljia").dataSchemaUrl()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("uyudivbxnhsq", response.iterator().next().inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); - Assertions.assertEquals(true, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(true, response.iterator().next().autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(false, response.iterator().next().autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, - response.iterator().next().dataResidencyBoundary()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListMockTests.java deleted file mode 100644 index 41a616a3c4de..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.Domain; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DomainsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"wkwbpjx\",\"jtxb\",\"sqtbxxniu\",\"sdzhgbdgzpagsec\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"u\",\"name\":\"qrgxf\",\"type\":\"lmqiynezoel\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"iwvmtumxpymdjfu\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"qvqpilrg\",\"name\":\"ncanlduwzor\",\"type\":\"sbmxaqk\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"kqv\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"dxcltuubwyvpj\",\"name\":\"owcpjqduqgixexky\",\"type\":\"fbwljavhuerkjdd\"}],\"provisioningState\":\"Updating\",\"minimumTlsVersionAllowed\":\"1.2\",\"endpoint\":\"gftcvbiiftksdwg\",\"inputSchema\":\"EventGridSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"otvmrxk\":{\"description\":\"hcebuvczldbglzo\",\"displayName\":\"baaq\",\"documentationUrl\":\"ekaj\",\"dataSchemaUrl\":\"yzgsnorbjgmnz\"},\"u\":{\"description\":\"obvvjbhvh\",\"displayName\":\"qayfl\",\"documentationUrl\":\"yu\",\"dataSchemaUrl\":\"n\"},\"yvrtp\":{\"description\":\"elvhyibdrqrswh\",\"displayName\":\"ubpyrow\",\"documentationUrl\":\"oxztfwfqch\",\"dataSchemaUrl\":\"zevjnnctag\"},\"h\":{\"description\":\"emhzc\",\"displayName\":\"repdqhqyhwq\",\"documentationUrl\":\"mvxqab\",\"dataSchemaUrl\":\"mzeoxinhgre\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"lpuzjpcee\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"prbfaxyxzlbciph\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":true,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"None\",\"principalId\":\"eeqgpkri\",\"tenantId\":\"bgnixxoww\",\"userAssignedIdentities\":{\"kwsdgkj\":{\"principalId\":\"wnwpiwxeii\",\"clientId\":\"mpepkldmaxxijv\"},\"qartwy\":{\"principalId\":\"acwras\",\"clientId\":\"wefcvoinw\"}}},\"location\":\"i\",\"tags\":{\"bym\":\"dvatdavuqm\",\"mvpsimioyo\":\"fobjlquvjezcj\",\"clibbfqpsp\":\"glkmiqwnnr\",\"exzgpmnmabedd\":\"ladydgnhautwu\"},\"id\":\"ilwgdfpfqfpcvstc\",\"name\":\"gq\",\"type\":\"vwerfwxbsmtb\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.domains().list("w", 568323800, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("i", response.iterator().next().location()); - Assertions.assertEquals("dvatdavuqm", response.iterator().next().tags().get("bym")); - Assertions.assertEquals(Sku.BASIC, response.iterator().next().sku().name()); - Assertions.assertEquals(IdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("eeqgpkri", response.iterator().next().identity().principalId()); - Assertions.assertEquals("bgnixxoww", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("wnwpiwxeii", - response.iterator().next().identity().userAssignedIdentities().get("kwsdgkj").principalId()); - Assertions.assertEquals("mpepkldmaxxijv", - response.iterator().next().identity().userAssignedIdentities().get("kwsdgkj").clientId()); - Assertions.assertEquals(TlsVersion.ONE_TWO, response.iterator().next().minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.EVENT_GRID_SCHEMA, response.iterator().next().inputSchema()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.iterator().next().eventTypeInfo().kind()); - Assertions.assertEquals("hcebuvczldbglzo", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("otvmrxk").description()); - Assertions.assertEquals("baaq", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("otvmrxk").displayName()); - Assertions.assertEquals("ekaj", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("otvmrxk").documentationUrl()); - Assertions.assertEquals("yzgsnorbjgmnz", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("otvmrxk").dataSchemaUrl()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("prbfaxyxzlbciph", response.iterator().next().inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); - Assertions.assertEquals(false, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(true, response.iterator().next().autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(false, response.iterator().next().autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, - response.iterator().next().dataResidencyBoundary()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListResultTests.java deleted file mode 100644 index 12b8bf62b95f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListResultTests.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.DomainInner; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.DomainsListResult; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceSku; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DomainsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DomainsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"ccymvaolpsslql\",\"name\":\"mmdnbbglzps\",\"type\":\"iydmcwyhzdxs\"},{\"properties\":{},\"id\":\"dbzm\",\"name\":\"vdfznudaodvxzb\",\"type\":\"cblylpstdbhhxsr\"},{\"properties\":{},\"id\":\"zucerscdntnev\",\"name\":\"iwjmygtdssls\",\"type\":\"tmweriofzpyq\"},{\"properties\":{},\"id\":\"mwabnetshhszhedp\",\"name\":\"vwiwubmwmbesld\",\"type\":\"k\"}],\"provisioningState\":\"Canceled\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"flcxoga\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"ikvmkqzeqqk\":{},\"l\":{},\"fzxmhhvhgureodkw\":{},\"bdagxt\":{}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"dxbx\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"qxn\",\"action\":\"Allow\"},{\"ipMask\":\"gxhuriplbp\",\"action\":\"Allow\"},{\"ipMask\":\"nkbebxmuby\",\"action\":\"Allow\"},{\"ipMask\":\"lrb\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":true,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"u\",\"tenantId\":\"auwzizxbmpgc\",\"userAssignedIdentities\":{\"bhjpglkfgohdne\":{\"principalId\":\"zmuvpbttdumorppx\",\"clientId\":\"mnzb\"},\"uvxzxclvi\":{\"principalId\":\"lfphsdyhtozfikd\",\"clientId\":\"wq\"},\"jutiiswacff\":{\"principalId\":\"hqzonosggbhcoh\",\"clientId\":\"dsjnka\"}}},\"location\":\"k\",\"tags\":{\"ppfufl\":\"wkfvhqcrailvp\",\"gafcnihgwqapnedg\":\"wdmhdlxyjrxs\",\"cvdrhvoodsot\":\"bcvkcvqvpkeq\"},\"id\":\"obzdopcjwvnhdl\",\"name\":\"wmgxcxrsl\",\"type\":\"mutwuoe\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"jw\",\"name\":\"iyq\",\"type\":\"luicpdggkzzlvmbm\"},{\"properties\":{},\"id\":\"xmodf\",\"name\":\"uefywsbpfvmwy\",\"type\":\"rfouyftaakcpw\"}],\"provisioningState\":\"Canceled\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"mnubexkpzksmond\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"omgkopkwho\":{},\"v\":{},\"ajqgxy\":{},\"mocmbqfqvmk\":{}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"zapvhelx\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"tddckcb\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":true,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"sdqrhzoymibmrq\",\"tenantId\":\"bahwfl\",\"userAssignedIdentities\":{\"nwashrtd\":{\"principalId\":\"tmhrkwofyyvoqacp\",\"clientId\":\"xpbtgiwbwo\"},\"i\":{\"principalId\":\"cnqxwbpokulpi\",\"clientId\":\"waasip\"},\"fbtkuwhhmhyk\":{\"principalId\":\"byuqerpqlp\",\"clientId\":\"cciuqgbdbutau\"}}},\"location\":\"oxafn\",\"tags\":{\"bpkkpwdre\":\"pichkoymkcdy\",\"suwsyrsnds\":\"novvqfovljxy\"},\"id\":\"tgadgvraeaen\",\"name\":\"qnzarrwl\",\"type\":\"uu\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"acewiipfpubjibw\",\"name\":\"iftohqkvpu\",\"type\":\"ksgplsa\"},{\"properties\":{},\"id\":\"ynfs\",\"name\":\"n\",\"type\":\"jphuopxodlqi\"}],\"provisioningState\":\"Succeeded\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"ihleos\",\"inputSchema\":\"CustomEventSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"yzrpzbchckqqzq\":{},\"ox\":{},\"ysuiizynkedya\":{},\"rwyhqmibzyhwitsm\":{}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"ynpcdpumnzgmwznm\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"orgjhxbldt\",\"action\":\"Allow\"},{\"ipMask\":\"lkdmtncvokotllxd\",\"action\":\"Allow\"},{\"ipMask\":\"y\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":true,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"rkvcikhnvpa\",\"tenantId\":\"gxqquezik\",\"userAssignedIdentities\":{\"cjzkzivgvvcna\":{\"principalId\":\"xkalla\",\"clientId\":\"elwuipi\"},\"lmfmtdaay\":{\"principalId\":\"hyrnxxmu\",\"clientId\":\"dndrdvstkwqqtche\"},\"xg\":{\"principalId\":\"v\",\"clientId\":\"gpiohgwxrtfudxe\"},\"dblx\":{\"principalId\":\"agvrvmnpkuk\",\"clientId\":\"i\"}}},\"location\":\"imfnjhfjx\",\"tags\":{\"foqreyfkzik\":\"zk\",\"wczelpci\":\"jawneaiv\",\"abfatkl\":\"elsfeaen\"},\"id\":\"dxbjhwuaanozj\",\"name\":\"sphyoulpjrvxa\",\"type\":\"l\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"wosytxitcskf\",\"name\":\"k\",\"type\":\"qumiek\"},{\"properties\":{},\"id\":\"zzikhlyfjhdg\",\"name\":\"gge\",\"type\":\"dunyg\"}],\"provisioningState\":\"Canceled\",\"minimumTlsVersionAllowed\":\"1.2\",\"endpoint\":\"qfatpxllrxcyjm\",\"inputSchema\":\"EventGridSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"m\":{}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"mjsjqb\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"rw\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":true,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"n\",\"tenantId\":\"xqugjhkycubedd\",\"userAssignedIdentities\":{\"qudf\":{\"principalId\":\"fwqmzqalkrmn\",\"clientId\":\"jpxac\"},\"zrtuzq\":{\"principalId\":\"yxbaaabjyvayf\",\"clientId\":\"m\"},\"uzsoi\":{\"principalId\":\"sexnevfdnw\",\"clientId\":\"mewzsyyc\"},\"rthzvaytdwkqbrqu\":{\"principalId\":\"ud\",\"clientId\":\"rx\"}}},\"location\":\"axhexiilivp\",\"tags\":{\"oruzfgsquyfxrxx\":\"irqtdqoa\",\"xje\":\"eptra\"},\"id\":\"wlwnwxuqlcv\",\"name\":\"dy\",\"type\":\"atdooaojkniod\"}],\"nextLink\":\"oebwnujhemms\"}") - .toObject(DomainsListResult.class); - Assertions.assertEquals("k", model.value().get(0).location()); - Assertions.assertEquals("wkfvhqcrailvp", model.value().get(0).tags().get("ppfufl")); - Assertions.assertEquals(Sku.PREMIUM, model.value().get(0).sku().name()); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("u", model.value().get(0).identity().principalId()); - Assertions.assertEquals("auwzizxbmpgc", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("zmuvpbttdumorppx", - model.value().get(0).identity().userAssignedIdentities().get("bhjpglkfgohdne").principalId()); - Assertions.assertEquals("mnzb", - model.value().get(0).identity().userAssignedIdentities().get("bhjpglkfgohdne").clientId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.value().get(0).inputSchema()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.value().get(0).eventTypeInfo().kind()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("qxn", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(true, model.value().get(0).autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(false, model.value().get(0).autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.value().get(0).dataResidencyBoundary()); - Assertions.assertEquals("oebwnujhemms", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DomainsListResult model = new DomainsListResult().withValue(Arrays.asList( - new DomainInner().withLocation("k") - .withTags(mapOf("ppfufl", "wkfvhqcrailvp", "gafcnihgwqapnedg", "wdmhdlxyjrxs", "cvdrhvoodsot", - "bcvkcvqvpkeq")) - .withSku(new ResourceSku().withName(Sku.PREMIUM)) - .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("u") - .withTenantId("auwzizxbmpgc") - .withUserAssignedIdentities(mapOf("bhjpglkfgohdne", - new UserIdentityProperties().withPrincipalId("zmuvpbttdumorppx").withClientId("mnzb"), - "uvxzxclvi", new UserIdentityProperties().withPrincipalId("lfphsdyhtozfikd").withClientId("wq"), - "jutiiswacff", - new UserIdentityProperties().withPrincipalId("hqzonosggbhcoh").withClientId("dsjnka")))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withInputSchema(InputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withEventTypeInfo( - new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("ikvmkqzeqqk", new InlineEventProperties(), "l", - new InlineEventProperties(), "fzxmhhvhgureodkw", new InlineEventProperties(), "bdagxt", - new InlineEventProperties()))) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("qxn").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("gxhuriplbp").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("nkbebxmuby").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("lrb").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withAutoCreateTopicWithFirstSubscription(true) - .withAutoDeleteTopicWithLastSubscription(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR), - new DomainInner().withLocation("oxafn") - .withTags(mapOf("bpkkpwdre", "pichkoymkcdy", "suwsyrsnds", "novvqfovljxy")) - .withSku(new ResourceSku().withName(Sku.BASIC)) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("sdqrhzoymibmrq") - .withTenantId("bahwfl") - .withUserAssignedIdentities(mapOf("nwashrtd", - new UserIdentityProperties().withPrincipalId("tmhrkwofyyvoqacp").withClientId("xpbtgiwbwo"), - "i", new UserIdentityProperties().withPrincipalId("cnqxwbpokulpi").withClientId("waasip"), - "fbtkuwhhmhyk", - new UserIdentityProperties().withPrincipalId("byuqerpqlp").withClientId("cciuqgbdbutau")))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) - .withInputSchema(InputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes( - mapOf("omgkopkwho", new InlineEventProperties(), "v", new InlineEventProperties(), "ajqgxy", - new InlineEventProperties(), "mocmbqfqvmk", new InlineEventProperties()))) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("tddckcb").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withAutoCreateTopicWithFirstSubscription(false) - .withAutoDeleteTopicWithLastSubscription(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_REGION), - new DomainInner().withLocation("imfnjhfjx") - .withTags(mapOf("foqreyfkzik", "zk", "wczelpci", "jawneaiv", "abfatkl", "elsfeaen")) - .withSku(new ResourceSku().withName(Sku.PREMIUM)) - .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("rkvcikhnvpa") - .withTenantId("gxqquezik") - .withUserAssignedIdentities(mapOf("cjzkzivgvvcna", - new UserIdentityProperties().withPrincipalId("xkalla").withClientId("elwuipi"), "lmfmtdaay", - new UserIdentityProperties().withPrincipalId("hyrnxxmu").withClientId("dndrdvstkwqqtche"), "xg", - new UserIdentityProperties().withPrincipalId("v").withClientId("gpiohgwxrtfudxe"), "dblx", - new UserIdentityProperties().withPrincipalId("agvrvmnpkuk").withClientId("i")))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) - .withInputSchema(InputSchema.CUSTOM_EVENT_SCHEMA) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("yzrpzbchckqqzq", new InlineEventProperties(), "ox", - new InlineEventProperties(), "ysuiizynkedya", new InlineEventProperties(), "rwyhqmibzyhwitsm", - new InlineEventProperties()))) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("orgjhxbldt").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("lkdmtncvokotllxd").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("y").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withAutoCreateTopicWithFirstSubscription(true) - .withAutoDeleteTopicWithLastSubscription(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR), - new DomainInner().withLocation("axhexiilivp") - .withTags(mapOf("oruzfgsquyfxrxx", "irqtdqoa", "xje", "eptra")) - .withSku(new ResourceSku().withName(Sku.PREMIUM)) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("n") - .withTenantId("xqugjhkycubedd") - .withUserAssignedIdentities(mapOf("qudf", - new UserIdentityProperties().withPrincipalId("fwqmzqalkrmn").withClientId("jpxac"), "zrtuzq", - new UserIdentityProperties().withPrincipalId("yxbaaabjyvayf").withClientId("m"), "uzsoi", - new UserIdentityProperties().withPrincipalId("sexnevfdnw").withClientId("mewzsyyc"), - "rthzvaytdwkqbrqu", new UserIdentityProperties().withPrincipalId("ud").withClientId("rx")))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) - .withInputSchema(InputSchema.EVENT_GRID_SCHEMA) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("m", new InlineEventProperties()))) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("rw").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withAutoCreateTopicWithFirstSubscription(false) - .withAutoDeleteTopicWithLastSubscription(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_REGION))) - .withNextLink("oebwnujhemms"); - model = BinaryData.fromObject(model).toObject(DomainsListResult.class); - Assertions.assertEquals("k", model.value().get(0).location()); - Assertions.assertEquals("wkfvhqcrailvp", model.value().get(0).tags().get("ppfufl")); - Assertions.assertEquals(Sku.PREMIUM, model.value().get(0).sku().name()); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("u", model.value().get(0).identity().principalId()); - Assertions.assertEquals("auwzizxbmpgc", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("zmuvpbttdumorppx", - model.value().get(0).identity().userAssignedIdentities().get("bhjpglkfgohdne").principalId()); - Assertions.assertEquals("mnzb", - model.value().get(0).identity().userAssignedIdentities().get("bhjpglkfgohdne").clientId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.value().get(0).inputSchema()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.value().get(0).eventTypeInfo().kind()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("qxn", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(true, model.value().get(0).autoCreateTopicWithFirstSubscription()); - Assertions.assertEquals(false, model.value().get(0).autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.value().get(0).dataResidencyBoundary()); - Assertions.assertEquals("oebwnujhemms", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DynamicDeliveryAttributeMappingPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DynamicDeliveryAttributeMappingPropertiesTests.java deleted file mode 100644 index e19a1081ab2a..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DynamicDeliveryAttributeMappingPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.DynamicDeliveryAttributeMappingProperties; -import org.junit.jupiter.api.Assertions; - -public final class DynamicDeliveryAttributeMappingPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DynamicDeliveryAttributeMappingProperties model = BinaryData.fromString("{\"sourceField\":\"aabjkdtfohfao\"}") - .toObject(DynamicDeliveryAttributeMappingProperties.class); - Assertions.assertEquals("aabjkdtfohfao", model.sourceField()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DynamicDeliveryAttributeMappingProperties model - = new DynamicDeliveryAttributeMappingProperties().withSourceField("aabjkdtfohfao"); - model = BinaryData.fromObject(model).toObject(DynamicDeliveryAttributeMappingProperties.class); - Assertions.assertEquals("aabjkdtfohfao", model.sourceField()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DynamicDeliveryAttributeMappingTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DynamicDeliveryAttributeMappingTests.java deleted file mode 100644 index 8e464723d376..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DynamicDeliveryAttributeMappingTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DynamicDeliveryAttributeMapping; -import org.junit.jupiter.api.Assertions; - -public final class DynamicDeliveryAttributeMappingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DynamicDeliveryAttributeMapping model = BinaryData - .fromString("{\"type\":\"Dynamic\",\"properties\":{\"sourceField\":\"kiwrsiw\"},\"name\":\"jqu\"}") - .toObject(DynamicDeliveryAttributeMapping.class); - Assertions.assertEquals("jqu", model.name()); - Assertions.assertEquals("kiwrsiw", model.sourceField()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DynamicDeliveryAttributeMapping model - = new DynamicDeliveryAttributeMapping().withName("jqu").withSourceField("kiwrsiw"); - model = BinaryData.fromObject(model).toObject(DynamicDeliveryAttributeMapping.class); - Assertions.assertEquals("jqu", model.name()); - Assertions.assertEquals("kiwrsiw", model.sourceField()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventHubEventSubscriptionDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventHubEventSubscriptionDestinationPropertiesTests.java deleted file mode 100644 index ee116ba0d3b8..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventHubEventSubscriptionDestinationPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.EventHubEventSubscriptionDestinationProperties; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EventHubEventSubscriptionDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventHubEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"kraokq\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"btwa\"}]}") - .toObject(EventHubEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("kraokq", model.resourceId()); - Assertions.assertEquals("btwa", model.deliveryAttributeMappings().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventHubEventSubscriptionDestinationProperties model - = new EventHubEventSubscriptionDestinationProperties().withResourceId("kraokq") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("btwa"))); - model = BinaryData.fromObject(model).toObject(EventHubEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("kraokq", model.resourceId()); - Assertions.assertEquals("btwa", model.deliveryAttributeMappings().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventHubEventSubscriptionDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventHubEventSubscriptionDestinationTests.java deleted file mode 100644 index 627499bf5063..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventHubEventSubscriptionDestinationTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import com.azure.resourcemanager.eventgrid.models.EventHubEventSubscriptionDestination; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EventHubEventSubscriptionDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventHubEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"EventHub\",\"properties\":{\"resourceId\":\"avlyttaaknwf\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"sm\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"dujdigatoleksc\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"tnanqimwb\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"pdcldpka\"}]}}") - .toObject(EventHubEventSubscriptionDestination.class); - Assertions.assertEquals("avlyttaaknwf", model.resourceId()); - Assertions.assertEquals("sm", model.deliveryAttributeMappings().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventHubEventSubscriptionDestination model - = new EventHubEventSubscriptionDestination().withResourceId("avlyttaaknwf") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("sm"), - new DeliveryAttributeMapping().withName("dujdigatoleksc"), - new DeliveryAttributeMapping().withName("tnanqimwb"), - new DeliveryAttributeMapping().withName("pdcldpka"))); - model = BinaryData.fromObject(model).toObject(EventHubEventSubscriptionDestination.class); - Assertions.assertEquals("avlyttaaknwf", model.resourceId()); - Assertions.assertEquals("sm", model.deliveryAttributeMappings().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionDestinationTests.java deleted file mode 100644 index d6e977b88d1d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionDestinationTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionDestination; - -public final class EventSubscriptionDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventSubscriptionDestination model - = BinaryData.fromString("{\"endpointType\":\"EventSubscriptionDestination\"}") - .toObject(EventSubscriptionDestination.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventSubscriptionDestination model = new EventSubscriptionDestination(); - model = BinaryData.fromObject(model).toObject(EventSubscriptionDestination.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionFullUrlInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionFullUrlInnerTests.java deleted file mode 100644 index 8870798fc8b4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionFullUrlInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner; -import org.junit.jupiter.api.Assertions; - -public final class EventSubscriptionFullUrlInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventSubscriptionFullUrlInner model - = BinaryData.fromString("{\"endpointUrl\":\"uexhdzx\"}").toObject(EventSubscriptionFullUrlInner.class); - Assertions.assertEquals("uexhdzx", model.endpointUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventSubscriptionFullUrlInner model = new EventSubscriptionFullUrlInner().withEndpointUrl("uexhdzx"); - model = BinaryData.fromObject(model).toObject(EventSubscriptionFullUrlInner.class); - Assertions.assertEquals("uexhdzx", model.endpointUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionIdentityTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionIdentityTests.java deleted file mode 100644 index a3198e43ee56..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionIdentityTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class EventSubscriptionIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventSubscriptionIdentity model - = BinaryData.fromString("{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"fdsd\"}") - .toObject(EventSubscriptionIdentity.class); - Assertions.assertEquals(EventSubscriptionIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("fdsd", model.userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventSubscriptionIdentity model - = new EventSubscriptionIdentity().withType(EventSubscriptionIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("fdsd"); - model = BinaryData.fromObject(model).toObject(EventSubscriptionIdentity.class); - Assertions.assertEquals(EventSubscriptionIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("fdsd", model.userAssignedIdentity()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteMockTests.java deleted file mode 100644 index 6db260724aa0..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EventSubscriptionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.eventSubscriptions().delete("h", "wvjaq", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java deleted file mode 100644 index a878a55d1a8c..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeListResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EventSubscriptionsGetDeliveryAttributesWithResponseMockTests { - @Test - public void testGetDeliveryAttributesWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"b\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"jhfv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeliveryAttributeListResult response = manager.eventSubscriptions() - .getDeliveryAttributesWithResponse("hujbfwxiplk", "solsyjprxslwhdm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("b", response.value().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlWithResponseMockTests.java deleted file mode 100644 index 10f3949fb030..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EventSubscriptionsGetFullUrlWithResponseMockTests { - @Test - public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"cwkqmtxape\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EventSubscriptionFullUrl response = manager.eventSubscriptions() - .getFullUrlWithResponse("pbyynvskpajbm", "eumexmjbxc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("cwkqmtxape", response.endpointUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListResultTests.java deleted file mode 100644 index 34cf493c6804..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListResultTests.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; -import com.azure.resourcemanager.eventgrid.models.AdvancedFilter; -import com.azure.resourcemanager.eventgrid.models.DeadLetterDestination; -import com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity; -import com.azure.resourcemanager.eventgrid.models.DeliveryWithResourceIdentity; -import com.azure.resourcemanager.eventgrid.models.EventDeliverySchema; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionDestination; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentityType; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; -import com.azure.resourcemanager.eventgrid.models.RetryPolicy; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EventSubscriptionsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventSubscriptionsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"topic\":\"hmtnvy\",\"provisioningState\":\"Succeeded\",\"destination\":{\"endpointType\":\"EventSubscriptionDestination\"},\"deliveryWithResourceIdentity\":{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"npwzcjaes\"},\"destination\":{\"endpointType\":\"EventSubscriptionDestination\"}},\"filter\":{\"subjectBeginsWith\":\"ccyajg\",\"subjectEndsWith\":\"fhwygzlvdnkfxus\",\"includedEventTypes\":[\"wzrmuh\",\"pfcqdp\"],\"isSubjectCaseSensitive\":false,\"enableAdvancedFilteringOnArrays\":true,\"advancedFilters\":[{\"operatorType\":\"AdvancedFilter\"}]},\"labels\":[\"oymgccelvezr\",\"pqlmfe\",\"kerqwkyh\",\"ob\"],\"expirationTimeUtc\":\"2021-08-24T12:29:29Z\",\"eventDeliverySchema\":\"CloudEventSchemaV1_0\",\"retryPolicy\":{\"maxDeliveryAttempts\":1041237961,\"eventTimeToLiveInMinutes\":615107136},\"deadLetterDestination\":{\"endpointType\":\"DeadLetterDestination\"},\"deadLetterWithResourceIdentity\":{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"fkbw\"},\"deadLetterDestination\":{\"endpointType\":\"DeadLetterDestination\"}}},\"id\":\"njv\",\"name\":\"dw\",\"type\":\"lpqekf\"}],\"nextLink\":\"khtj\"}") - .toObject(EventSubscriptionsListResult.class); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, - model.value().get(0).deliveryWithResourceIdentity().identity().type()); - Assertions.assertEquals("npwzcjaes", - model.value().get(0).deliveryWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals("ccyajg", model.value().get(0).filter().subjectBeginsWith()); - Assertions.assertEquals("fhwygzlvdnkfxus", model.value().get(0).filter().subjectEndsWith()); - Assertions.assertEquals("wzrmuh", model.value().get(0).filter().includedEventTypes().get(0)); - Assertions.assertEquals(false, model.value().get(0).filter().isSubjectCaseSensitive()); - Assertions.assertEquals(true, model.value().get(0).filter().enableAdvancedFilteringOnArrays()); - Assertions.assertEquals("oymgccelvezr", model.value().get(0).labels().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-24T12:29:29Z"), model.value().get(0).expirationTimeUtc()); - Assertions.assertEquals(EventDeliverySchema.CLOUD_EVENT_SCHEMA_V1_0, - model.value().get(0).eventDeliverySchema()); - Assertions.assertEquals(1041237961, model.value().get(0).retryPolicy().maxDeliveryAttempts()); - Assertions.assertEquals(615107136, model.value().get(0).retryPolicy().eventTimeToLiveInMinutes()); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, - model.value().get(0).deadLetterWithResourceIdentity().identity().type()); - Assertions.assertEquals("fkbw", - model.value().get(0).deadLetterWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals("khtj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventSubscriptionsListResult model - = new EventSubscriptionsListResult().withValue( - Arrays.asList(new EventSubscriptionInner().withDestination(new EventSubscriptionDestination()) - .withDeliveryWithResourceIdentity(new DeliveryWithResourceIdentity() - .withIdentity( - new EventSubscriptionIdentity().withType(EventSubscriptionIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("npwzcjaes")) - .withDestination(new EventSubscriptionDestination())) - .withFilter(new EventSubscriptionFilter().withSubjectBeginsWith("ccyajg") - .withSubjectEndsWith("fhwygzlvdnkfxus") - .withIncludedEventTypes(Arrays.asList("wzrmuh", "pfcqdp")) - .withIsSubjectCaseSensitive(false) - .withEnableAdvancedFilteringOnArrays(true) - .withAdvancedFilters(Arrays.asList(new AdvancedFilter()))) - .withLabels(Arrays.asList("oymgccelvezr", "pqlmfe", "kerqwkyh", "ob")) - .withExpirationTimeUtc(OffsetDateTime.parse("2021-08-24T12:29:29Z")) - .withEventDeliverySchema(EventDeliverySchema.CLOUD_EVENT_SCHEMA_V1_0) - .withRetryPolicy( - new RetryPolicy().withMaxDeliveryAttempts(1041237961).withEventTimeToLiveInMinutes(615107136)) - .withDeadLetterDestination(new DeadLetterDestination()) - .withDeadLetterWithResourceIdentity(new DeadLetterWithResourceIdentity() - .withIdentity( - new EventSubscriptionIdentity().withType(EventSubscriptionIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("fkbw")) - .withDeadLetterDestination(new DeadLetterDestination())))) - .withNextLink("khtj"); - model = BinaryData.fromObject(model).toObject(EventSubscriptionsListResult.class); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, - model.value().get(0).deliveryWithResourceIdentity().identity().type()); - Assertions.assertEquals("npwzcjaes", - model.value().get(0).deliveryWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals("ccyajg", model.value().get(0).filter().subjectBeginsWith()); - Assertions.assertEquals("fhwygzlvdnkfxus", model.value().get(0).filter().subjectEndsWith()); - Assertions.assertEquals("wzrmuh", model.value().get(0).filter().includedEventTypes().get(0)); - Assertions.assertEquals(false, model.value().get(0).filter().isSubjectCaseSensitive()); - Assertions.assertEquals(true, model.value().get(0).filter().enableAdvancedFilteringOnArrays()); - Assertions.assertEquals("oymgccelvezr", model.value().get(0).labels().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-24T12:29:29Z"), model.value().get(0).expirationTimeUtc()); - Assertions.assertEquals(EventDeliverySchema.CLOUD_EVENT_SCHEMA_V1_0, - model.value().get(0).eventDeliverySchema()); - Assertions.assertEquals(1041237961, model.value().get(0).retryPolicy().maxDeliveryAttempts()); - Assertions.assertEquals(615107136, model.value().get(0).retryPolicy().eventTimeToLiveInMinutes()); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, - model.value().get(0).deadLetterWithResourceIdentity().identity().type()); - Assertions.assertEquals("fkbw", - model.value().get(0).deadLetterWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals("khtj", model.nextLink()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypeInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypeInfoTests.java deleted file mode 100644 index e962be9f5643..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypeInfoTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EventTypeInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventTypeInfo model = BinaryData.fromString( - "{\"kind\":\"Inline\",\"inlineEventTypes\":{\"eltmrldhugjzzdat\":{\"description\":\"jitcjczdzevn\",\"displayName\":\"krwpdap\",\"documentationUrl\":\"sbdkvwr\",\"dataSchemaUrl\":\"feusnhut\"},\"ftyxolniw\":{\"description\":\"hocdgeab\",\"displayName\":\"phut\",\"documentationUrl\":\"ndv\",\"dataSchemaUrl\":\"ozwyiftyhxhuro\"}}}") - .toObject(EventTypeInfo.class); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.kind()); - Assertions.assertEquals("jitcjczdzevn", model.inlineEventTypes().get("eltmrldhugjzzdat").description()); - Assertions.assertEquals("krwpdap", model.inlineEventTypes().get("eltmrldhugjzzdat").displayName()); - Assertions.assertEquals("sbdkvwr", model.inlineEventTypes().get("eltmrldhugjzzdat").documentationUrl()); - Assertions.assertEquals("feusnhut", model.inlineEventTypes().get("eltmrldhugjzzdat").dataSchemaUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventTypeInfo model = new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("eltmrldhugjzzdat", - new InlineEventProperties().withDescription("jitcjczdzevn") - .withDisplayName("krwpdap") - .withDocumentationUrl("sbdkvwr") - .withDataSchemaUrl("feusnhut"), - "ftyxolniw", - new InlineEventProperties().withDescription("hocdgeab") - .withDisplayName("phut") - .withDocumentationUrl("ndv") - .withDataSchemaUrl("ozwyiftyhxhuro"))); - model = BinaryData.fromObject(model).toObject(EventTypeInfo.class); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.kind()); - Assertions.assertEquals("jitcjczdzevn", model.inlineEventTypes().get("eltmrldhugjzzdat").description()); - Assertions.assertEquals("krwpdap", model.inlineEventTypes().get("eltmrldhugjzzdat").displayName()); - Assertions.assertEquals("sbdkvwr", model.inlineEventTypes().get("eltmrldhugjzzdat").documentationUrl()); - Assertions.assertEquals("feusnhut", model.inlineEventTypes().get("eltmrldhugjzzdat").dataSchemaUrl()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypeInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypeInnerTests.java deleted file mode 100644 index 77e91ae84211..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypeInnerTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.EventTypeInner; -import org.junit.jupiter.api.Assertions; - -public final class EventTypeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventTypeInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"vqdbpbhfck\",\"description\":\"ezcrcssbzhddubb\",\"schemaUrl\":\"fblhkalehp\",\"isInDefaultSet\":true},\"id\":\"wugiqjti\",\"name\":\"gqgdminictteajoh\",\"type\":\"ygspnbonhpczykm\"}") - .toObject(EventTypeInner.class); - Assertions.assertEquals("vqdbpbhfck", model.displayName()); - Assertions.assertEquals("ezcrcssbzhddubb", model.description()); - Assertions.assertEquals("fblhkalehp", model.schemaUrl()); - Assertions.assertEquals(true, model.isInDefaultSet()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventTypeInner model = new EventTypeInner().withDisplayName("vqdbpbhfck") - .withDescription("ezcrcssbzhddubb") - .withSchemaUrl("fblhkalehp") - .withIsInDefaultSet(true); - model = BinaryData.fromObject(model).toObject(EventTypeInner.class); - Assertions.assertEquals("vqdbpbhfck", model.displayName()); - Assertions.assertEquals("ezcrcssbzhddubb", model.description()); - Assertions.assertEquals("fblhkalehp", model.schemaUrl()); - Assertions.assertEquals(true, model.isInDefaultSet()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypePropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypePropertiesTests.java deleted file mode 100644 index 57056a67198a..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypePropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.EventTypeProperties; -import org.junit.jupiter.api.Assertions; - -public final class EventTypePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventTypeProperties model = BinaryData.fromString( - "{\"displayName\":\"p\",\"description\":\"xqcsehch\",\"schemaUrl\":\"ufmpqumqyjgy\",\"isInDefaultSet\":true}") - .toObject(EventTypeProperties.class); - Assertions.assertEquals("p", model.displayName()); - Assertions.assertEquals("xqcsehch", model.description()); - Assertions.assertEquals("ufmpqumqyjgy", model.schemaUrl()); - Assertions.assertEquals(true, model.isInDefaultSet()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventTypeProperties model = new EventTypeProperties().withDisplayName("p") - .withDescription("xqcsehch") - .withSchemaUrl("ufmpqumqyjgy") - .withIsInDefaultSet(true); - model = BinaryData.fromObject(model).toObject(EventTypeProperties.class); - Assertions.assertEquals("p", model.displayName()); - Assertions.assertEquals("xqcsehch", model.description()); - Assertions.assertEquals("ufmpqumqyjgy", model.schemaUrl()); - Assertions.assertEquals(true, model.isInDefaultSet()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypesListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypesListResultTests.java deleted file mode 100644 index fdd2dea44159..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypesListResultTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.EventTypeInner; -import com.azure.resourcemanager.eventgrid.models.EventTypesListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EventTypesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventTypesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"blkwqpatvbqs\",\"description\":\"cjbctviv\",\"schemaUrl\":\"qymtuowogtgits\",\"isInDefaultSet\":true},\"id\":\"vbrzcdb\",\"name\":\"nfzndscxmxeat\",\"type\":\"db\"},{\"properties\":{\"displayName\":\"rdjyibqb\",\"description\":\"omhjrmkuhm\",\"schemaUrl\":\"ljalfihcjmobc\",\"isInDefaultSet\":false},\"id\":\"de\",\"name\":\"xqcwgax\",\"type\":\"gvaknokzwjjzrl\"},{\"properties\":{\"displayName\":\"l\",\"description\":\"yyfytpqsixymm\",\"schemaUrl\":\"jivyqlkjuv\",\"isInDefaultSet\":true},\"id\":\"msl\",\"name\":\"oyovwz\",\"type\":\"bpqvybefg\"},{\"properties\":{\"displayName\":\"nokcv\",\"description\":\"ubseskvcuartr\",\"schemaUrl\":\"nlp\",\"isInDefaultSet\":true},\"id\":\"kycndzfqivjreuy\",\"name\":\"bbmnwagltb\",\"type\":\"oeeonqlnfwm\"}]}") - .toObject(EventTypesListResult.class); - Assertions.assertEquals("blkwqpatvbqs", model.value().get(0).displayName()); - Assertions.assertEquals("cjbctviv", model.value().get(0).description()); - Assertions.assertEquals("qymtuowogtgits", model.value().get(0).schemaUrl()); - Assertions.assertEquals(true, model.value().get(0).isInDefaultSet()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventTypesListResult model = new EventTypesListResult().withValue(Arrays.asList( - new EventTypeInner().withDisplayName("blkwqpatvbqs") - .withDescription("cjbctviv") - .withSchemaUrl("qymtuowogtgits") - .withIsInDefaultSet(true), - new EventTypeInner().withDisplayName("rdjyibqb") - .withDescription("omhjrmkuhm") - .withSchemaUrl("ljalfihcjmobc") - .withIsInDefaultSet(false), - new EventTypeInner().withDisplayName("l") - .withDescription("yyfytpqsixymm") - .withSchemaUrl("jivyqlkjuv") - .withIsInDefaultSet(true), - new EventTypeInner().withDisplayName("nokcv") - .withDescription("ubseskvcuartr") - .withSchemaUrl("nlp") - .withIsInDefaultSet(true))); - model = BinaryData.fromObject(model).toObject(EventTypesListResult.class); - Assertions.assertEquals("blkwqpatvbqs", model.value().get(0).displayName()); - Assertions.assertEquals("cjbctviv", model.value().get(0).description()); - Assertions.assertEquals("qymtuowogtgits", model.value().get(0).schemaUrl()); - Assertions.assertEquals(true, model.value().get(0).isInDefaultSet()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtendedLocationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtendedLocationTests.java deleted file mode 100644 index 61dffc166ca9..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtendedLocationTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; -import org.junit.jupiter.api.Assertions; - -public final class ExtendedLocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtendedLocation model = BinaryData.fromString("{\"name\":\"uskbrreq\",\"type\":\"kceysfaqegplw\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("uskbrreq", model.name()); - Assertions.assertEquals("kceysfaqegplw", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model = new ExtendedLocation().withName("uskbrreq").withType("kceysfaqegplw"); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("uskbrreq", model.name()); - Assertions.assertEquals("kceysfaqegplw", model.type()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicInnerTests.java deleted file mode 100644 index f8799818fe91..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ExtensionTopicInner; -import org.junit.jupiter.api.Assertions; - -public final class ExtensionTopicInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionTopicInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"dsaeuzanhsfnh\",\"systemTopic\":\"nwph\"},\"id\":\"fngq\",\"name\":\"clid\",\"type\":\"tujwjju\"}") - .toObject(ExtensionTopicInner.class); - Assertions.assertEquals("dsaeuzanhsfnh", model.description()); - Assertions.assertEquals("nwph", model.systemTopic()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtensionTopicInner model = new ExtensionTopicInner().withDescription("dsaeuzanhsfnh").withSystemTopic("nwph"); - model = BinaryData.fromObject(model).toObject(ExtensionTopicInner.class); - Assertions.assertEquals("dsaeuzanhsfnh", model.description()); - Assertions.assertEquals("nwph", model.systemTopic()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicPropertiesTests.java deleted file mode 100644 index b3390e0dfb2a..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ExtensionTopicProperties; -import org.junit.jupiter.api.Assertions; - -public final class ExtensionTopicPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionTopicProperties model - = BinaryData.fromString("{\"description\":\"beqrkuorh\",\"systemTopic\":\"sruqnmdvha\"}") - .toObject(ExtensionTopicProperties.class); - Assertions.assertEquals("beqrkuorh", model.description()); - Assertions.assertEquals("sruqnmdvha", model.systemTopic()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtensionTopicProperties model - = new ExtensionTopicProperties().withDescription("beqrkuorh").withSystemTopic("sruqnmdvha"); - model = BinaryData.fromObject(model).toObject(ExtensionTopicProperties.class); - Assertions.assertEquals("beqrkuorh", model.description()); - Assertions.assertEquals("sruqnmdvha", model.systemTopic()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetWithResponseMockTests.java deleted file mode 100644 index ced4a0716bcd..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetWithResponseMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.ExtensionTopic; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ExtensionTopicsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"description\":\"lehhkplobzg\",\"systemTopic\":\"taksadzighmmt\"},\"id\":\"dvucfvvra\",\"name\":\"beurdeewl\",\"type\":\"uxpcbwkdwj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ExtensionTopic response - = manager.extensionTopics().getWithResponse("mhnmizhvprhqqw", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("lehhkplobzg", response.description()); - Assertions.assertEquals("taksadzighmmt", response.systemTopic()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/HybridConnectionEventSubscriptionDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/HybridConnectionEventSubscriptionDestinationPropertiesTests.java deleted file mode 100644 index cb095e99d54b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/HybridConnectionEventSubscriptionDestinationPropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.HybridConnectionEventSubscriptionDestinationProperties; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HybridConnectionEventSubscriptionDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HybridConnectionEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"tqqvy\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"rfwb\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"qvogfuyz\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"bhli\"}]}") - .toObject(HybridConnectionEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("tqqvy", model.resourceId()); - Assertions.assertEquals("rfwb", model.deliveryAttributeMappings().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HybridConnectionEventSubscriptionDestinationProperties model - = new HybridConnectionEventSubscriptionDestinationProperties().withResourceId("tqqvy") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("rfwb"), - new DeliveryAttributeMapping().withName("qvogfuyz"), - new DeliveryAttributeMapping().withName("bhli"))); - model = BinaryData.fromObject(model).toObject(HybridConnectionEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("tqqvy", model.resourceId()); - Assertions.assertEquals("rfwb", model.deliveryAttributeMappings().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/HybridConnectionEventSubscriptionDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/HybridConnectionEventSubscriptionDestinationTests.java deleted file mode 100644 index 0517a09d11d4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/HybridConnectionEventSubscriptionDestinationTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import com.azure.resourcemanager.eventgrid.models.HybridConnectionEventSubscriptionDestination; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HybridConnectionEventSubscriptionDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HybridConnectionEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"HybridConnection\",\"properties\":{\"resourceId\":\"qecroodl\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"rdaasaxxo\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"mfkwiyjvzuk\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"r\"}]}}") - .toObject(HybridConnectionEventSubscriptionDestination.class); - Assertions.assertEquals("qecroodl", model.resourceId()); - Assertions.assertEquals("rdaasaxxo", model.deliveryAttributeMappings().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HybridConnectionEventSubscriptionDestination model - = new HybridConnectionEventSubscriptionDestination().withResourceId("qecroodl") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("rdaasaxxo"), - new DeliveryAttributeMapping().withName("mfkwiyjvzuk"), - new DeliveryAttributeMapping().withName("r"))); - model = BinaryData.fromObject(model).toObject(HybridConnectionEventSubscriptionDestination.class); - Assertions.assertEquals("qecroodl", model.resourceId()); - Assertions.assertEquals("rdaasaxxo", model.deliveryAttributeMappings().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/IdentityInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/IdentityInfoTests.java deleted file mode 100644 index bbb19bf8f848..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/IdentityInfoTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IdentityInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityInfo model = BinaryData.fromString( - "{\"type\":\"UserAssigned\",\"principalId\":\"vriuhprwmdyvx\",\"tenantId\":\"ayriwwroyqbexrm\",\"userAssignedIdentities\":{\"pjyzhpv\":{\"principalId\":\"ycnojvknmefqsg\",\"clientId\":\"ah\"},\"hzovawjvzunlut\":{\"principalId\":\"zcjrvxdjzlmwlx\",\"clientId\":\"ug\"}}}") - .toObject(IdentityInfo.class); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("vriuhprwmdyvx", model.principalId()); - Assertions.assertEquals("ayriwwroyqbexrm", model.tenantId()); - Assertions.assertEquals("ycnojvknmefqsg", model.userAssignedIdentities().get("pjyzhpv").principalId()); - Assertions.assertEquals("ah", model.userAssignedIdentities().get("pjyzhpv").clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityInfo model = new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("vriuhprwmdyvx") - .withTenantId("ayriwwroyqbexrm") - .withUserAssignedIdentities(mapOf("pjyzhpv", - new UserIdentityProperties().withPrincipalId("ycnojvknmefqsg").withClientId("ah"), "hzovawjvzunlut", - new UserIdentityProperties().withPrincipalId("zcjrvxdjzlmwlx").withClientId("ug"))); - model = BinaryData.fromObject(model).toObject(IdentityInfo.class); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("vriuhprwmdyvx", model.principalId()); - Assertions.assertEquals("ayriwwroyqbexrm", model.tenantId()); - Assertions.assertEquals("ycnojvknmefqsg", model.userAssignedIdentities().get("pjyzhpv").principalId()); - Assertions.assertEquals("ah", model.userAssignedIdentities().get("pjyzhpv").clientId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InboundIpRuleTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InboundIpRuleTests.java deleted file mode 100644 index 637099a9ccf8..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InboundIpRuleTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import org.junit.jupiter.api.Assertions; - -public final class InboundIpRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InboundIpRule model = BinaryData.fromString("{\"ipMask\":\"mtsavjcbpwxqp\",\"action\":\"Allow\"}") - .toObject(InboundIpRule.class); - Assertions.assertEquals("mtsavjcbpwxqp", model.ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InboundIpRule model = new InboundIpRule().withIpMask("mtsavjcbpwxqp").withAction(IpActionType.ALLOW); - model = BinaryData.fromObject(model).toObject(InboundIpRule.class); - Assertions.assertEquals("mtsavjcbpwxqp", model.ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.action()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InlineEventPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InlineEventPropertiesTests.java deleted file mode 100644 index f0d31f282c1b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InlineEventPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import org.junit.jupiter.api.Assertions; - -public final class InlineEventPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InlineEventProperties model = BinaryData.fromString( - "{\"description\":\"cukjf\",\"displayName\":\"iawxklry\",\"documentationUrl\":\"wckbasyypnd\",\"dataSchemaUrl\":\"sgcbac\"}") - .toObject(InlineEventProperties.class); - Assertions.assertEquals("cukjf", model.description()); - Assertions.assertEquals("iawxklry", model.displayName()); - Assertions.assertEquals("wckbasyypnd", model.documentationUrl()); - Assertions.assertEquals("sgcbac", model.dataSchemaUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InlineEventProperties model = new InlineEventProperties().withDescription("cukjf") - .withDisplayName("iawxklry") - .withDocumentationUrl("wckbasyypnd") - .withDataSchemaUrl("sgcbac"); - model = BinaryData.fromObject(model).toObject(InlineEventProperties.class); - Assertions.assertEquals("cukjf", model.description()); - Assertions.assertEquals("iawxklry", model.displayName()); - Assertions.assertEquals("wckbasyypnd", model.documentationUrl()); - Assertions.assertEquals("sgcbac", model.dataSchemaUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InputSchemaMappingTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InputSchemaMappingTests.java deleted file mode 100644 index 7623b07fc65d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InputSchemaMappingTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; - -public final class InputSchemaMappingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InputSchemaMapping model = BinaryData.fromString("{\"inputSchemaMappingType\":\"InputSchemaMapping\"}") - .toObject(InputSchemaMapping.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InputSchemaMapping model = new InputSchemaMapping(); - model = BinaryData.fromObject(model).toObject(InputSchemaMapping.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/IssuerCertificateInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/IssuerCertificateInfoTests.java deleted file mode 100644 index db4020957620..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/IssuerCertificateInfoTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationManagedIdentity; -import com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationManagedIdentityType; -import com.azure.resourcemanager.eventgrid.models.IssuerCertificateInfo; -import org.junit.jupiter.api.Assertions; - -public final class IssuerCertificateInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IssuerCertificateInfo model = BinaryData.fromString( - "{\"certificateUrl\":\"a\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"lihhyuspskasdvlm\"}}") - .toObject(IssuerCertificateInfo.class); - Assertions.assertEquals("a", model.certificateUrl()); - Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("lihhyuspskasdvlm", model.identity().userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IssuerCertificateInfo model = new IssuerCertificateInfo().withCertificateUrl("a") - .withIdentity(new CustomJwtAuthenticationManagedIdentity() - .withType(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("lihhyuspskasdvlm")); - model = BinaryData.fromObject(model).toObject(IssuerCertificateInfo.class); - Assertions.assertEquals("a", model.certificateUrl()); - Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("lihhyuspskasdvlm", model.identity().userAssignedIdentity()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonFieldTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonFieldTests.java deleted file mode 100644 index df9c4124eaf6..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonFieldTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.JsonField; -import org.junit.jupiter.api.Assertions; - -public final class JsonFieldTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JsonField model = BinaryData.fromString("{\"sourceField\":\"rsqftib\"}").toObject(JsonField.class); - Assertions.assertEquals("rsqftib", model.sourceField()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JsonField model = new JsonField().withSourceField("rsqftib"); - model = BinaryData.fromObject(model).toObject(JsonField.class); - Assertions.assertEquals("rsqftib", model.sourceField()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonFieldWithDefaultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonFieldWithDefaultTests.java deleted file mode 100644 index 7afab8ff2643..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonFieldWithDefaultTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.JsonFieldWithDefault; -import org.junit.jupiter.api.Assertions; - -public final class JsonFieldWithDefaultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JsonFieldWithDefault model = BinaryData.fromString("{\"sourceField\":\"ibuyvpirf\",\"defaultValue\":\"pnqn\"}") - .toObject(JsonFieldWithDefault.class); - Assertions.assertEquals("ibuyvpirf", model.sourceField()); - Assertions.assertEquals("pnqn", model.defaultValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JsonFieldWithDefault model = new JsonFieldWithDefault().withSourceField("ibuyvpirf").withDefaultValue("pnqn"); - model = BinaryData.fromObject(model).toObject(JsonFieldWithDefault.class); - Assertions.assertEquals("ibuyvpirf", model.sourceField()); - Assertions.assertEquals("pnqn", model.defaultValue()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonInputSchemaMappingPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonInputSchemaMappingPropertiesTests.java deleted file mode 100644 index 985abf64380e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonInputSchemaMappingPropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.JsonInputSchemaMappingProperties; -import com.azure.resourcemanager.eventgrid.models.JsonField; -import com.azure.resourcemanager.eventgrid.models.JsonFieldWithDefault; -import org.junit.jupiter.api.Assertions; - -public final class JsonInputSchemaMappingPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JsonInputSchemaMappingProperties model = BinaryData.fromString( - "{\"id\":{\"sourceField\":\"meikj\"},\"topic\":{\"sourceField\":\"zacn\"},\"eventTime\":{\"sourceField\":\"fsuqtaazyqbxy\"},\"eventType\":{\"sourceField\":\"fp\",\"defaultValue\":\"qi\"},\"subject\":{\"sourceField\":\"xlhdj\",\"defaultValue\":\"dcadwvpsozjiihjr\"},\"dataVersion\":{\"sourceField\":\"mrzoep\",\"defaultValue\":\"wdvwnjkgvfnmx\"}}") - .toObject(JsonInputSchemaMappingProperties.class); - Assertions.assertEquals("meikj", model.id().sourceField()); - Assertions.assertEquals("zacn", model.topic().sourceField()); - Assertions.assertEquals("fsuqtaazyqbxy", model.eventTime().sourceField()); - Assertions.assertEquals("fp", model.eventType().sourceField()); - Assertions.assertEquals("qi", model.eventType().defaultValue()); - Assertions.assertEquals("xlhdj", model.subject().sourceField()); - Assertions.assertEquals("dcadwvpsozjiihjr", model.subject().defaultValue()); - Assertions.assertEquals("mrzoep", model.dataVersion().sourceField()); - Assertions.assertEquals("wdvwnjkgvfnmx", model.dataVersion().defaultValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JsonInputSchemaMappingProperties model = new JsonInputSchemaMappingProperties() - .withId(new JsonField().withSourceField("meikj")) - .withTopic(new JsonField().withSourceField("zacn")) - .withEventTime(new JsonField().withSourceField("fsuqtaazyqbxy")) - .withEventType(new JsonFieldWithDefault().withSourceField("fp").withDefaultValue("qi")) - .withSubject(new JsonFieldWithDefault().withSourceField("xlhdj").withDefaultValue("dcadwvpsozjiihjr")) - .withDataVersion(new JsonFieldWithDefault().withSourceField("mrzoep").withDefaultValue("wdvwnjkgvfnmx")); - model = BinaryData.fromObject(model).toObject(JsonInputSchemaMappingProperties.class); - Assertions.assertEquals("meikj", model.id().sourceField()); - Assertions.assertEquals("zacn", model.topic().sourceField()); - Assertions.assertEquals("fsuqtaazyqbxy", model.eventTime().sourceField()); - Assertions.assertEquals("fp", model.eventType().sourceField()); - Assertions.assertEquals("qi", model.eventType().defaultValue()); - Assertions.assertEquals("xlhdj", model.subject().sourceField()); - Assertions.assertEquals("dcadwvpsozjiihjr", model.subject().defaultValue()); - Assertions.assertEquals("mrzoep", model.dataVersion().sourceField()); - Assertions.assertEquals("wdvwnjkgvfnmx", model.dataVersion().defaultValue()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonInputSchemaMappingTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonInputSchemaMappingTests.java deleted file mode 100644 index 0ea544c087d4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonInputSchemaMappingTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.JsonField; -import com.azure.resourcemanager.eventgrid.models.JsonFieldWithDefault; -import com.azure.resourcemanager.eventgrid.models.JsonInputSchemaMapping; -import org.junit.jupiter.api.Assertions; - -public final class JsonInputSchemaMappingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JsonInputSchemaMapping model = BinaryData.fromString( - "{\"inputSchemaMappingType\":\"Json\",\"properties\":{\"id\":{\"sourceField\":\"bedenrexkx\"},\"topic\":{\"sourceField\":\"vucnulgmnh\"},\"eventTime\":{\"sourceField\":\"dyznfajsvks\"},\"eventType\":{\"sourceField\":\"ozzkivyhjrlii\",\"defaultValue\":\"ixlqfhefkwabsolr\"},\"subject\":{\"sourceField\":\"qlmgnlqxsjxt\",\"defaultValue\":\"exhvuqbozoolz\"},\"dataVersion\":{\"sourceField\":\"arkuzl\",\"defaultValue\":\"nndtsnxa\"}}}") - .toObject(JsonInputSchemaMapping.class); - Assertions.assertEquals("bedenrexkx", model.id().sourceField()); - Assertions.assertEquals("vucnulgmnh", model.topic().sourceField()); - Assertions.assertEquals("dyznfajsvks", model.eventTime().sourceField()); - Assertions.assertEquals("ozzkivyhjrlii", model.eventType().sourceField()); - Assertions.assertEquals("ixlqfhefkwabsolr", model.eventType().defaultValue()); - Assertions.assertEquals("qlmgnlqxsjxt", model.subject().sourceField()); - Assertions.assertEquals("exhvuqbozoolz", model.subject().defaultValue()); - Assertions.assertEquals("arkuzl", model.dataVersion().sourceField()); - Assertions.assertEquals("nndtsnxa", model.dataVersion().defaultValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JsonInputSchemaMapping model = new JsonInputSchemaMapping() - .withId(new JsonField().withSourceField("bedenrexkx")) - .withTopic(new JsonField().withSourceField("vucnulgmnh")) - .withEventTime(new JsonField().withSourceField("dyznfajsvks")) - .withEventType( - new JsonFieldWithDefault().withSourceField("ozzkivyhjrlii").withDefaultValue("ixlqfhefkwabsolr")) - .withSubject(new JsonFieldWithDefault().withSourceField("qlmgnlqxsjxt").withDefaultValue("exhvuqbozoolz")) - .withDataVersion(new JsonFieldWithDefault().withSourceField("arkuzl").withDefaultValue("nndtsnxa")); - model = BinaryData.fromObject(model).toObject(JsonInputSchemaMapping.class); - Assertions.assertEquals("bedenrexkx", model.id().sourceField()); - Assertions.assertEquals("vucnulgmnh", model.topic().sourceField()); - Assertions.assertEquals("dyznfajsvks", model.eventTime().sourceField()); - Assertions.assertEquals("ozzkivyhjrlii", model.eventType().sourceField()); - Assertions.assertEquals("ixlqfhefkwabsolr", model.eventType().defaultValue()); - Assertions.assertEquals("qlmgnlqxsjxt", model.subject().sourceField()); - Assertions.assertEquals("exhvuqbozoolz", model.subject().defaultValue()); - Assertions.assertEquals("arkuzl", model.dataVersion().sourceField()); - Assertions.assertEquals("nndtsnxa", model.dataVersion().defaultValue()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/MonitorAlertEventSubscriptionDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/MonitorAlertEventSubscriptionDestinationPropertiesTests.java deleted file mode 100644 index e8b6d39606af..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/MonitorAlertEventSubscriptionDestinationPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.MonitorAlertEventSubscriptionDestinationProperties; -import com.azure.resourcemanager.eventgrid.models.MonitorAlertSeverity; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitorAlertEventSubscriptionDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorAlertEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"severity\":\"Sev3\",\"description\":\"r\",\"actionGroups\":[\"hlwcjsqg\",\"jhffbxrqrkij\",\"euqlsdxeqztv\"]}") - .toObject(MonitorAlertEventSubscriptionDestinationProperties.class); - Assertions.assertEquals(MonitorAlertSeverity.SEV3, model.severity()); - Assertions.assertEquals("r", model.description()); - Assertions.assertEquals("hlwcjsqg", model.actionGroups().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorAlertEventSubscriptionDestinationProperties model - = new MonitorAlertEventSubscriptionDestinationProperties().withSeverity(MonitorAlertSeverity.SEV3) - .withDescription("r") - .withActionGroups(Arrays.asList("hlwcjsqg", "jhffbxrqrkij", "euqlsdxeqztv")); - model = BinaryData.fromObject(model).toObject(MonitorAlertEventSubscriptionDestinationProperties.class); - Assertions.assertEquals(MonitorAlertSeverity.SEV3, model.severity()); - Assertions.assertEquals("r", model.description()); - Assertions.assertEquals("hlwcjsqg", model.actionGroups().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/MonitorAlertEventSubscriptionDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/MonitorAlertEventSubscriptionDestinationTests.java deleted file mode 100644 index b0ab0fd25a1f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/MonitorAlertEventSubscriptionDestinationTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.MonitorAlertEventSubscriptionDestination; -import com.azure.resourcemanager.eventgrid.models.MonitorAlertSeverity; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitorAlertEventSubscriptionDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorAlertEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"MonitorAlert\",\"properties\":{\"severity\":\"Sev2\",\"description\":\"mjswenawwamecle\",\"actionGroups\":[\"ulndhzyoeo\",\"ht\",\"llhsvidmyt\",\"l\"]}}") - .toObject(MonitorAlertEventSubscriptionDestination.class); - Assertions.assertEquals(MonitorAlertSeverity.SEV2, model.severity()); - Assertions.assertEquals("mjswenawwamecle", model.description()); - Assertions.assertEquals("ulndhzyoeo", model.actionGroups().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorAlertEventSubscriptionDestination model - = new MonitorAlertEventSubscriptionDestination().withSeverity(MonitorAlertSeverity.SEV2) - .withDescription("mjswenawwamecle") - .withActionGroups(Arrays.asList("ulndhzyoeo", "ht", "llhsvidmyt", "l")); - model = BinaryData.fromObject(model).toObject(MonitorAlertEventSubscriptionDestination.class); - Assertions.assertEquals(MonitorAlertSeverity.SEV2, model.severity()); - Assertions.assertEquals("mjswenawwamecle", model.description()); - Assertions.assertEquals("ulndhzyoeo", model.actionGroups().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceSkuTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceSkuTests.java deleted file mode 100644 index 8384abd62b95..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceSkuTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.NamespaceSku; -import com.azure.resourcemanager.eventgrid.models.SkuName; -import org.junit.jupiter.api.Assertions; - -public final class NamespaceSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NamespaceSku model - = BinaryData.fromString("{\"name\":\"Standard\",\"capacity\":1190049726}").toObject(NamespaceSku.class); - Assertions.assertEquals(SkuName.STANDARD, model.name()); - Assertions.assertEquals(1190049726, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NamespaceSku model = new NamespaceSku().withName(SkuName.STANDARD).withCapacity(1190049726); - model = BinaryData.fromObject(model).toObject(NamespaceSku.class); - Assertions.assertEquals(SkuName.STANDARD, model.name()); - Assertions.assertEquals(1190049726, model.capacity()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionDestinationPropertiesTests.java deleted file mode 100644 index 226d420e614d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionDestinationPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicEventSubscriptionDestinationProperties; -import org.junit.jupiter.api.Assertions; - -public final class NamespaceTopicEventSubscriptionDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NamespaceTopicEventSubscriptionDestinationProperties model - = BinaryData.fromString("{\"resourceId\":\"lxpnovyoanf\"}") - .toObject(NamespaceTopicEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("lxpnovyoanf", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NamespaceTopicEventSubscriptionDestinationProperties model - = new NamespaceTopicEventSubscriptionDestinationProperties().withResourceId("lxpnovyoanf"); - model = BinaryData.fromObject(model).toObject(NamespaceTopicEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("lxpnovyoanf", model.resourceId()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionDestinationTests.java deleted file mode 100644 index 7d5ca6afef89..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionDestinationTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.NamespaceTopicEventSubscriptionDestination; -import org.junit.jupiter.api.Assertions; - -public final class NamespaceTopicEventSubscriptionDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NamespaceTopicEventSubscriptionDestination model - = BinaryData.fromString("{\"endpointType\":\"NamespaceTopic\",\"properties\":{\"resourceId\":\"wqagy\"}}") - .toObject(NamespaceTopicEventSubscriptionDestination.class); - Assertions.assertEquals("wqagy", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NamespaceTopicEventSubscriptionDestination model - = new NamespaceTopicEventSubscriptionDestination().withResourceId("wqagy"); - model = BinaryData.fromObject(model).toObject(NamespaceTopicEventSubscriptionDestination.class); - Assertions.assertEquals("wqagy", model.resourceId()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsDeleteMockTests.java deleted file mode 100644 index c86c21dfabcf..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NamespaceTopicEventSubscriptionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.namespaceTopicEventSubscriptions() - .delete("xt", "higqqbtimpkjbl", "rnsihqhudsmus", "aawja", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java deleted file mode 100644 index 122915e009c4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeListResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NamespaceTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests { - @Test - public void testGetDeliveryAttributesWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"piuzvk\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"hdimjuktirzkau\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeliveryAttributeListResult response = manager.namespaceTopicEventSubscriptions() - .getDeliveryAttributesWithResponse("rrihufoi", "ppiybxv", "nzuz", "bgk", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("piuzvk", response.value().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java deleted file mode 100644 index 8629b71e3f26..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.SubscriptionFullUrl; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NamespaceTopicEventSubscriptionsGetFullUrlWithResponseMockTests { - @Test - public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"wrjlvzkl\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SubscriptionFullUrl response = manager.namespaceTopicEventSubscriptions() - .getFullUrlWithResponse("pucdocf", "plw", "o", "m", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wrjlvzkl", response.endpointUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicInnerTests.java deleted file mode 100644 index 14d9e6e2acb8..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicInnerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner; -import com.azure.resourcemanager.eventgrid.models.EventInputSchema; -import com.azure.resourcemanager.eventgrid.models.PublisherType; -import org.junit.jupiter.api.Assertions; - -public final class NamespaceTopicInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NamespaceTopicInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"CreateFailed\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1829917026},\"id\":\"aauzzptjazysd\",\"name\":\"hezwwvaiq\",\"type\":\"uvvfonkp\"}") - .toObject(NamespaceTopicInner.class); - Assertions.assertEquals(PublisherType.CUSTOM, model.publisherType()); - Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(1829917026, model.eventRetentionInDays()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NamespaceTopicInner model = new NamespaceTopicInner().withPublisherType(PublisherType.CUSTOM) - .withInputSchema(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withEventRetentionInDays(1829917026); - model = BinaryData.fromObject(model).toObject(NamespaceTopicInner.class); - Assertions.assertEquals(PublisherType.CUSTOM, model.publisherType()); - Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(1829917026, model.eventRetentionInDays()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicPropertiesTests.java deleted file mode 100644 index 0ac2451da523..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicPropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicProperties; -import com.azure.resourcemanager.eventgrid.models.EventInputSchema; -import com.azure.resourcemanager.eventgrid.models.PublisherType; -import org.junit.jupiter.api.Assertions; - -public final class NamespaceTopicPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NamespaceTopicProperties model = BinaryData.fromString( - "{\"provisioningState\":\"DeleteFailed\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1355780032}") - .toObject(NamespaceTopicProperties.class); - Assertions.assertEquals(PublisherType.CUSTOM, model.publisherType()); - Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(1355780032, model.eventRetentionInDays()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NamespaceTopicProperties model = new NamespaceTopicProperties().withPublisherType(PublisherType.CUSTOM) - .withInputSchema(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withEventRetentionInDays(1355780032); - model = BinaryData.fromObject(model).toObject(NamespaceTopicProperties.class); - Assertions.assertEquals(PublisherType.CUSTOM, model.publisherType()); - Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(1355780032, model.eventRetentionInDays()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicUpdateParameterPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicUpdateParameterPropertiesTests.java deleted file mode 100644 index a946b262ce95..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicUpdateParameterPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicUpdateParameterProperties; -import org.junit.jupiter.api.Assertions; - -public final class NamespaceTopicUpdateParameterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NamespaceTopicUpdateParameterProperties model = BinaryData.fromString("{\"eventRetentionInDays\":808991328}") - .toObject(NamespaceTopicUpdateParameterProperties.class); - Assertions.assertEquals(808991328, model.eventRetentionInDays()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NamespaceTopicUpdateParameterProperties model - = new NamespaceTopicUpdateParameterProperties().withEventRetentionInDays(808991328); - model = BinaryData.fromObject(model).toObject(NamespaceTopicUpdateParameterProperties.class); - Assertions.assertEquals(808991328, model.eventRetentionInDays()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicUpdateParametersTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicUpdateParametersTests.java deleted file mode 100644 index 3cac4fec964c..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicUpdateParametersTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.NamespaceTopicUpdateParameters; -import org.junit.jupiter.api.Assertions; - -public final class NamespaceTopicUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NamespaceTopicUpdateParameters model - = BinaryData.fromString("{\"properties\":{\"eventRetentionInDays\":909531601}}") - .toObject(NamespaceTopicUpdateParameters.class); - Assertions.assertEquals(909531601, model.eventRetentionInDays()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NamespaceTopicUpdateParameters model = new NamespaceTopicUpdateParameters().withEventRetentionInDays(909531601); - model = BinaryData.fromObject(model).toObject(NamespaceTopicUpdateParameters.class); - Assertions.assertEquals(909531601, model.eventRetentionInDays()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsCreateOrUpdateMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsCreateOrUpdateMockTests.java deleted file mode 100644 index a0f82c13ccb2..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventInputSchema; -import com.azure.resourcemanager.eventgrid.models.NamespaceTopic; -import com.azure.resourcemanager.eventgrid.models.PublisherType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NamespaceTopicsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1223455688},\"id\":\"kjgpjeuxsphlokfp\",\"name\":\"ijpdvzvfbhwbdquf\",\"type\":\"cgnrglaqrwy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NamespaceTopic response = manager.namespaceTopics() - .define("ftsaebwfwh") - .withExistingNamespace("pcwybsz", "ncnpat") - .withPublisherType(PublisherType.CUSTOM) - .withInputSchema(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withEventRetentionInDays(809458754) - .create(); - - Assertions.assertEquals(PublisherType.CUSTOM, response.publisherType()); - Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, response.inputSchema()); - Assertions.assertEquals(1223455688, response.eventRetentionInDays()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsDeleteMockTests.java deleted file mode 100644 index 0b556dabffd5..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NamespaceTopicsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.namespaceTopics().delete("swyiljpibkgxyxy", "ux", "eddobmcnltm", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsGetWithResponseMockTests.java deleted file mode 100644 index 158030bf9f65..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsGetWithResponseMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventInputSchema; -import com.azure.resourcemanager.eventgrid.models.NamespaceTopic; -import com.azure.resourcemanager.eventgrid.models.PublisherType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NamespaceTopicsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1912066587},\"id\":\"xjqfiafcnlrtbfi\",\"name\":\"zzcaoijolbuauk\",\"type\":\"wieopexelxqdw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NamespaceTopic response = manager.namespaceTopics() - .getWithResponse("oikvntwcz", "zwushlcxpblal", "hezpfkissaidqzs", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(PublisherType.CUSTOM, response.publisherType()); - Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, response.inputSchema()); - Assertions.assertEquals(1912066587, response.eventRetentionInDays()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListByNamespaceMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListByNamespaceMockTests.java deleted file mode 100644 index 47dd28fe24c5..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListByNamespaceMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventInputSchema; -import com.azure.resourcemanager.eventgrid.models.NamespaceTopic; -import com.azure.resourcemanager.eventgrid.models.PublisherType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NamespaceTopicsListByNamespaceMockTests { - @Test - public void testListByNamespace() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1878226203},\"id\":\"li\",\"name\":\"rycgnwplrrbph\",\"type\":\"tsbbibtic\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.namespaceTopics() - .listByNamespace("ytkujsq", "cm", "oxfab", 82442515, com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PublisherType.CUSTOM, response.iterator().next().publisherType()); - Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, response.iterator().next().inputSchema()); - Assertions.assertEquals(1878226203, response.iterator().next().eventRetentionInDays()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListResultTests.java deleted file mode 100644 index 0b86d7fa8afe..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListResultTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner; -import com.azure.resourcemanager.eventgrid.models.EventInputSchema; -import com.azure.resourcemanager.eventgrid.models.NamespaceTopicsListResult; -import com.azure.resourcemanager.eventgrid.models.PublisherType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NamespaceTopicsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NamespaceTopicsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1694439284},\"id\":\"y\",\"name\":\"vpo\",\"type\":\"krsgsgb\"},{\"properties\":{\"provisioningState\":\"Deleted\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":308026039},\"id\":\"ynscl\",\"name\":\"qhzvhxnkomt\",\"type\":\"u\"}],\"nextLink\":\"tppn\"}") - .toObject(NamespaceTopicsListResult.class); - Assertions.assertEquals(PublisherType.CUSTOM, model.value().get(0).publisherType()); - Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.value().get(0).inputSchema()); - Assertions.assertEquals(1694439284, model.value().get(0).eventRetentionInDays()); - Assertions.assertEquals("tppn", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NamespaceTopicsListResult model = new NamespaceTopicsListResult().withValue(Arrays.asList( - new NamespaceTopicInner().withPublisherType(PublisherType.CUSTOM) - .withInputSchema(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withEventRetentionInDays(1694439284), - new NamespaceTopicInner().withPublisherType(PublisherType.CUSTOM) - .withInputSchema(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withEventRetentionInDays(308026039))) - .withNextLink("tppn"); - model = BinaryData.fromObject(model).toObject(NamespaceTopicsListResult.class); - Assertions.assertEquals(PublisherType.CUSTOM, model.value().get(0).publisherType()); - Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.value().get(0).inputSchema()); - Assertions.assertEquals(1694439284, model.value().get(0).eventRetentionInDays()); - Assertions.assertEquals("tppn", model.nextLink()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesDeleteMockTests.java deleted file mode 100644 index 10e569a46c45..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NamespacesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.namespaces().delete("b", "ekymffztsilscvqs", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListResultTests.java deleted file mode 100644 index 642f661fcc48..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListResultTests.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner; -import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.eventgrid.models.AlternativeAuthenticationNameSource; -import com.azure.resourcemanager.eventgrid.models.ClientAuthenticationSettings; -import com.azure.resourcemanager.eventgrid.models.CustomDomainConfiguration; -import com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationSettings; -import com.azure.resourcemanager.eventgrid.models.DynamicRoutingEnrichment; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.NamespaceSku; -import com.azure.resourcemanager.eventgrid.models.NamespacesListResult; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.RoutingEnrichments; -import com.azure.resourcemanager.eventgrid.models.RoutingIdentityInfo; -import com.azure.resourcemanager.eventgrid.models.RoutingIdentityType; -import com.azure.resourcemanager.eventgrid.models.SkuName; -import com.azure.resourcemanager.eventgrid.models.StaticRoutingEnrichment; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; -import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfigurationState; -import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NamespacesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NamespacesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"rhubskhud\",\"name\":\"goo\",\"type\":\"kkqfqjbvle\"},{\"properties\":{},\"id\":\"fmluiqtqzfavyvn\",\"name\":\"qybaryeua\",\"type\":\"jkqa\"},{\"properties\":{},\"id\":\"gzslesjcbhernnti\",\"name\":\"w\",\"type\":\"jcvb\"},{\"properties\":{},\"id\":\"wr\",\"name\":\"ehwagoh\",\"type\":\"uffkmrqemvvh\"}],\"provisioningState\":\"DeleteFailed\",\"topicsConfiguration\":{\"hostname\":\"jfutacoebj\",\"customDomains\":[{\"fullyQualifiedDomainName\":\"zcjznmwcpmgua\"},{\"fullyQualifiedDomainName\":\"draufactkah\"},{\"fullyQualifiedDomainName\":\"ovajjziuxxps\"},{\"fullyQualifiedDomainName\":\"neekulfg\"}]},\"topicSpacesConfiguration\":{\"state\":\"Disabled\",\"routeTopicResourceId\":\"kwdlenrdsutujba\",\"hostname\":\"juohminyflnorw\",\"routingEnrichments\":{\"static\":[{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"}],\"dynamic\":[{},{}]},\"clientAuthentication\":{\"alternativeAuthenticationNameSources\":[\"ClientCertificateUri\",\"ClientCertificateUri\"],\"customJwtAuthentication\":{}},\"maximumSessionExpiryInHours\":1194335789,\"maximumClientSessionsPerAuthenticationName\":1138704794,\"routingIdentityInfo\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"chisze\"},\"customDomains\":[{\"fullyQualifiedDomainName\":\"bjcrxgibbdaxco\"}]},\"isZoneRedundant\":true,\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"sukokwbqplhl\",\"action\":\"Allow\"},{\"ipMask\":\"epzl\",\"action\":\"Allow\"},{\"ipMask\":\"zsoldwey\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.2\"},\"sku\":{\"name\":\"Standard\",\"capacity\":1255734454},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"ork\",\"tenantId\":\"lywjhh\",\"userAssignedIdentities\":{\"dieuzaofj\":{\"principalId\":\"xmsivfomiloxggdu\",\"clientId\":\"q\"},\"cubiipuipw\":{\"principalId\":\"vcyy\",\"clientId\":\"fgdo\"}}},\"location\":\"onmacjekniz\",\"tags\":{\"gmblrri\":\"vcimpev\"},\"id\":\"bywdxsmicc\",\"name\":\"rwfscjfnynszquj\",\"type\":\"zdvoqytibyowbb\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"utp\",\"name\":\"hjoxo\",\"type\":\"smsks\"}],\"provisioningState\":\"Failed\",\"topicsConfiguration\":{\"hostname\":\"qolj\",\"customDomains\":[{\"fullyQualifiedDomainName\":\"gxxlxsffgcvizq\"},{\"fullyQualifiedDomainName\":\"dwl\"}]},\"topicSpacesConfiguration\":{\"state\":\"Enabled\",\"routeTopicResourceId\":\"upfgfbk\",\"hostname\":\"bdyhgkfminsgowz\",\"routingEnrichments\":{\"static\":[{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"}],\"dynamic\":[{}]},\"clientAuthentication\":{\"alternativeAuthenticationNameSources\":[\"ClientCertificateSubject\"],\"customJwtAuthentication\":{}},\"maximumSessionExpiryInHours\":1941309010,\"maximumClientSessionsPerAuthenticationName\":520028629,\"routingIdentityInfo\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"zukxitmmqtgqq\"},\"customDomains\":[{\"fullyQualifiedDomainName\":\"rnxrxcpj\"},{\"fullyQualifiedDomainName\":\"isavok\"}]},\"isZoneRedundant\":false,\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"vjlfrqtt\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.1\"},\"sku\":{\"name\":\"Standard\",\"capacity\":1264491301},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"id\",\"tenantId\":\"qfkuvscxkdmli\",\"userAssignedIdentities\":{\"bteoybf\":{\"principalId\":\"brxk\",\"clientId\":\"loazuruocbgoo\"},\"b\":{\"principalId\":\"xakvvjgslor\",\"clientId\":\"lmywwtkgkxnyed\"},\"bvpa\":{\"principalId\":\"vudtjuewbcihx\",\"clientId\":\"whcjyxcc\"},\"stcyohpfkyrkdbd\":{\"principalId\":\"kkudzp\",\"clientId\":\"wjplma\"}}},\"location\":\"ogsjkmnwqjno\",\"tags\":{\"egfnmntfpmvmemfn\":\"yhddvia\",\"lchpodbzevwrdn\":\"zdwvvbalxl\"},\"id\":\"fukuvsjcswsmystu\",\"name\":\"uqypfcvle\",\"type\":\"chpqbmfpjba\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"cxsspuunnoxyh\",\"name\":\"xgqddrih\",\"type\":\"fhoqca\"}],\"provisioningState\":\"Canceled\",\"topicsConfiguration\":{\"hostname\":\"omdjvlpjxxkzbrm\",\"customDomains\":[{\"fullyQualifiedDomainName\":\"ivsiy\"},{\"fullyQualifiedDomainName\":\"zkdnc\"},{\"fullyQualifiedDomainName\":\"dxonbzoggculap\"}]},\"topicSpacesConfiguration\":{\"state\":\"Enabled\",\"routeTopicResourceId\":\"gogtqxepnylbf\",\"hostname\":\"jlyjtlvofq\",\"routingEnrichments\":{\"static\":[{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"}],\"dynamic\":[{},{}]},\"clientAuthentication\":{\"alternativeAuthenticationNameSources\":[\"ClientCertificateSubject\"],\"customJwtAuthentication\":{}},\"maximumSessionExpiryInHours\":1566451113,\"maximumClientSessionsPerAuthenticationName\":1105067830,\"routingIdentityInfo\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"dwxf\"},\"customDomains\":[{\"fullyQualifiedDomainName\":\"ivwzjbhyzs\"},{\"fullyQualifiedDomainName\":\"jrkambtrnegvmnv\"},{\"fullyQualifiedDomainName\":\"q\"},{\"fullyQualifiedDomainName\":\"qvldspastjbkkd\"}]},\"isZoneRedundant\":false,\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"jlxr\",\"action\":\"Allow\"},{\"ipMask\":\"zapeewchpx\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.2\"},\"sku\":{\"name\":\"Standard\",\"capacity\":1190990500},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"ufuztcktyhjtq\",\"tenantId\":\"cgzulwmmrqzzr\",\"userAssignedIdentities\":{\"vtoepryutnw\":{\"principalId\":\"gl\",\"clientId\":\"zgkrvqe\"},\"adflgzu\":{\"principalId\":\"pzdm\",\"clientId\":\"zvfvaawz\"}}},\"location\":\"glae\",\"tags\":{\"t\":\"dticokpvzml\",\"x\":\"ld\"},\"id\":\"bf\",\"name\":\"rclnpkc\",\"type\":\"ayzri\"}],\"nextLink\":\"hya\"}") - .toObject(NamespacesListResult.class); - Assertions.assertEquals("onmacjekniz", model.value().get(0).location()); - Assertions.assertEquals("vcimpev", model.value().get(0).tags().get("gmblrri")); - Assertions.assertEquals(SkuName.STANDARD, model.value().get(0).sku().name()); - Assertions.assertEquals(1255734454, model.value().get(0).sku().capacity()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ork", model.value().get(0).identity().principalId()); - Assertions.assertEquals("lywjhh", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("xmsivfomiloxggdu", - model.value().get(0).identity().userAssignedIdentities().get("dieuzaofj").principalId()); - Assertions.assertEquals("q", - model.value().get(0).identity().userAssignedIdentities().get("dieuzaofj").clientId()); - Assertions.assertEquals("zcjznmwcpmgua", - model.value().get(0).topicsConfiguration().customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(TopicSpacesConfigurationState.DISABLED, - model.value().get(0).topicSpacesConfiguration().state()); - Assertions.assertEquals("kwdlenrdsutujba", - model.value().get(0).topicSpacesConfiguration().routeTopicResourceId()); - Assertions.assertEquals(AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_URI, - model.value() - .get(0) - .topicSpacesConfiguration() - .clientAuthentication() - .alternativeAuthenticationNameSources() - .get(0)); - Assertions.assertEquals(1194335789, - model.value().get(0).topicSpacesConfiguration().maximumSessionExpiryInHours()); - Assertions.assertEquals(1138704794, - model.value().get(0).topicSpacesConfiguration().maximumClientSessionsPerAuthenticationName()); - Assertions.assertEquals(RoutingIdentityType.SYSTEM_ASSIGNED, - model.value().get(0).topicSpacesConfiguration().routingIdentityInfo().type()); - Assertions.assertEquals("chisze", - model.value().get(0).topicSpacesConfiguration().routingIdentityInfo().userAssignedIdentity()); - Assertions.assertEquals("bjcrxgibbdaxco", - model.value().get(0).topicSpacesConfiguration().customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(true, model.value().get(0).isZoneRedundant()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("sukokwbqplhl", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals("hya", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NamespacesListResult model = new NamespacesListResult() - .withValue(Arrays.asList( - new NamespaceInner().withLocation("onmacjekniz") - .withTags(mapOf("gmblrri", "vcimpev")) - .withSku(new NamespaceSku().withName(SkuName.STANDARD).withCapacity(1255734454)) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("ork") - .withTenantId("lywjhh") - .withUserAssignedIdentities(mapOf("dieuzaofj", - new UserIdentityProperties().withPrincipalId("xmsivfomiloxggdu").withClientId("q"), - "cubiipuipw", new UserIdentityProperties().withPrincipalId("vcyy").withClientId("fgdo")))) - .withPrivateEndpointConnections( - Arrays.asList(new PrivateEndpointConnectionInner(), new PrivateEndpointConnectionInner(), - new PrivateEndpointConnectionInner(), new PrivateEndpointConnectionInner())) - .withTopicsConfiguration(new TopicsConfiguration().withCustomDomains( - Arrays.asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("zcjznmwcpmgua"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("draufactkah"), - new CustomDomainConfiguration() - .withFullyQualifiedDomainName("ovajjziuxxps"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("neekulfg")))) - .withTopicSpacesConfiguration(new TopicSpacesConfiguration() - .withState(TopicSpacesConfigurationState.DISABLED) - .withRouteTopicResourceId("kwdlenrdsutujba") - .withRoutingEnrichments(new RoutingEnrichments() - .withStaticProperty( - Arrays.asList(new StaticRoutingEnrichment(), new StaticRoutingEnrichment(), - new StaticRoutingEnrichment(), new StaticRoutingEnrichment())) - .withDynamic(Arrays.asList(new DynamicRoutingEnrichment(), new DynamicRoutingEnrichment()))) - .withClientAuthentication(new ClientAuthenticationSettings() - .withAlternativeAuthenticationNameSources( - Arrays.asList(AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_URI, - AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_URI)) - .withCustomJwtAuthentication(new CustomJwtAuthenticationSettings())) - .withMaximumSessionExpiryInHours(1194335789) - .withMaximumClientSessionsPerAuthenticationName(1138704794) - .withRoutingIdentityInfo(new RoutingIdentityInfo().withType(RoutingIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("chisze")) - .withCustomDomains(Arrays - .asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("bjcrxgibbdaxco")))) - .withIsZoneRedundant(true) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("sukokwbqplhl").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("epzl") - .withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("zsoldwey").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO), - new NamespaceInner().withLocation("ogsjkmnwqjno") - .withTags(mapOf("egfnmntfpmvmemfn", "yhddvia", "lchpodbzevwrdn", "zdwvvbalxl")) - .withSku(new NamespaceSku().withName(SkuName.STANDARD).withCapacity(1264491301)) - .withIdentity( - new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("id") - .withTenantId("qfkuvscxkdmli") - .withUserAssignedIdentities(mapOf("bteoybf", - new UserIdentityProperties().withPrincipalId("brxk").withClientId("loazuruocbgoo"), "b", - new UserIdentityProperties().withPrincipalId("xakvvjgslor") - .withClientId("lmywwtkgkxnyed"), - "bvpa", - new UserIdentityProperties().withPrincipalId("vudtjuewbcihx").withClientId("whcjyxcc"), - "stcyohpfkyrkdbd", - new UserIdentityProperties().withPrincipalId("kkudzp").withClientId("wjplma")))) - .withPrivateEndpointConnections(Arrays.asList(new PrivateEndpointConnectionInner())) - .withTopicsConfiguration(new TopicsConfiguration().withCustomDomains(Arrays.asList( - new CustomDomainConfiguration().withFullyQualifiedDomainName("gxxlxsffgcvizq"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("dwl")))) - .withTopicSpacesConfiguration( - new TopicSpacesConfiguration().withState(TopicSpacesConfigurationState.ENABLED) - .withRouteTopicResourceId("upfgfbk") - .withRoutingEnrichments(new RoutingEnrichments() - .withStaticProperty(Arrays.asList(new StaticRoutingEnrichment(), - new StaticRoutingEnrichment(), new StaticRoutingEnrichment())) - .withDynamic(Arrays.asList(new DynamicRoutingEnrichment()))) - .withClientAuthentication(new ClientAuthenticationSettings() - .withAlternativeAuthenticationNameSources( - Arrays.asList(AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_SUBJECT)) - .withCustomJwtAuthentication(new CustomJwtAuthenticationSettings())) - .withMaximumSessionExpiryInHours(1941309010) - .withMaximumClientSessionsPerAuthenticationName(520028629) - .withRoutingIdentityInfo( - new RoutingIdentityInfo().withType(RoutingIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("zukxitmmqtgqq")) - .withCustomDomains( - Arrays.asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("rnxrxcpj"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("isavok")))) - .withIsZoneRedundant(false) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("vjlfrqtt").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE), - new NamespaceInner().withLocation("glae") - .withTags(mapOf("t", "dticokpvzml", "x", "ld")) - .withSku(new NamespaceSku().withName(SkuName.STANDARD).withCapacity(1190990500)) - .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("ufuztcktyhjtq") - .withTenantId("cgzulwmmrqzzr") - .withUserAssignedIdentities(mapOf("vtoepryutnw", - new UserIdentityProperties().withPrincipalId("gl").withClientId("zgkrvqe"), "adflgzu", - new UserIdentityProperties().withPrincipalId("pzdm").withClientId("zvfvaawz")))) - .withPrivateEndpointConnections(Arrays.asList(new PrivateEndpointConnectionInner())) - .withTopicsConfiguration(new TopicsConfiguration().withCustomDomains( - Arrays.asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("ivsiy"), - new CustomDomainConfiguration() - .withFullyQualifiedDomainName("zkdnc"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("dxonbzoggculap")))) - .withTopicSpacesConfiguration(new TopicSpacesConfiguration() - .withState(TopicSpacesConfigurationState.ENABLED) - .withRouteTopicResourceId("gogtqxepnylbf") - .withRoutingEnrichments(new RoutingEnrichments() - .withStaticProperty( - Arrays.asList(new StaticRoutingEnrichment(), new StaticRoutingEnrichment(), - new StaticRoutingEnrichment(), new StaticRoutingEnrichment())) - .withDynamic(Arrays.asList(new DynamicRoutingEnrichment(), new DynamicRoutingEnrichment()))) - .withClientAuthentication(new ClientAuthenticationSettings() - .withAlternativeAuthenticationNameSources( - Arrays.asList(AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_SUBJECT)) - .withCustomJwtAuthentication(new CustomJwtAuthenticationSettings())) - .withMaximumSessionExpiryInHours(1566451113) - .withMaximumClientSessionsPerAuthenticationName(1105067830) - .withRoutingIdentityInfo(new RoutingIdentityInfo().withType(RoutingIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("dwxf")) - .withCustomDomains( - Arrays.asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("ivwzjbhyzs"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("jrkambtrnegvmnv"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("q"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("qvldspastjbkkd")))) - .withIsZoneRedundant(false) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("jlxr").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("zapeewchpx").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO))) - .withNextLink("hya"); - model = BinaryData.fromObject(model).toObject(NamespacesListResult.class); - Assertions.assertEquals("onmacjekniz", model.value().get(0).location()); - Assertions.assertEquals("vcimpev", model.value().get(0).tags().get("gmblrri")); - Assertions.assertEquals(SkuName.STANDARD, model.value().get(0).sku().name()); - Assertions.assertEquals(1255734454, model.value().get(0).sku().capacity()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ork", model.value().get(0).identity().principalId()); - Assertions.assertEquals("lywjhh", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("xmsivfomiloxggdu", - model.value().get(0).identity().userAssignedIdentities().get("dieuzaofj").principalId()); - Assertions.assertEquals("q", - model.value().get(0).identity().userAssignedIdentities().get("dieuzaofj").clientId()); - Assertions.assertEquals("zcjznmwcpmgua", - model.value().get(0).topicsConfiguration().customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(TopicSpacesConfigurationState.DISABLED, - model.value().get(0).topicSpacesConfiguration().state()); - Assertions.assertEquals("kwdlenrdsutujba", - model.value().get(0).topicSpacesConfiguration().routeTopicResourceId()); - Assertions.assertEquals(AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_URI, - model.value() - .get(0) - .topicSpacesConfiguration() - .clientAuthentication() - .alternativeAuthenticationNameSources() - .get(0)); - Assertions.assertEquals(1194335789, - model.value().get(0).topicSpacesConfiguration().maximumSessionExpiryInHours()); - Assertions.assertEquals(1138704794, - model.value().get(0).topicSpacesConfiguration().maximumClientSessionsPerAuthenticationName()); - Assertions.assertEquals(RoutingIdentityType.SYSTEM_ASSIGNED, - model.value().get(0).topicSpacesConfiguration().routingIdentityInfo().type()); - Assertions.assertEquals("chisze", - model.value().get(0).topicSpacesConfiguration().routingIdentityInfo().userAssignedIdentity()); - Assertions.assertEquals("bjcrxgibbdaxco", - model.value().get(0).topicSpacesConfiguration().customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(true, model.value().get(0).isZoneRedundant()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("sukokwbqplhl", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals("hya", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesValidateCustomDomainOwnershipMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesValidateCustomDomainOwnershipMockTests.java deleted file mode 100644 index a6b22dcd0a02..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesValidateCustomDomainOwnershipMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.CustomDomainIdentityType; -import com.azure.resourcemanager.eventgrid.models.CustomDomainOwnershipValidationResult; -import com.azure.resourcemanager.eventgrid.models.CustomDomainValidationState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NamespacesValidateCustomDomainOwnershipMockTests { - @Test - public void testValidateCustomDomainOwnership() throws Exception { - String responseStr - = "{\"customDomainsForTopicsConfiguration\":[{\"fullyQualifiedDomainName\":\"aqotnndxolousdv\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"wz\"},\"certificateUrl\":\"rp\",\"expectedTxtRecordName\":\"fu\",\"expectedTxtRecordValue\":\"yctsdbtqgkuj\"},{\"fullyQualifiedDomainName\":\"sooxrqw\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"gapdyarikeej\"},\"certificateUrl\":\"dfhtwmmkfqbriqul\",\"expectedTxtRecordName\":\"trj\",\"expectedTxtRecordValue\":\"qkvyhzokpoyuohu\"}],\"customDomainsForTopicSpacesConfiguration\":[{\"fullyQualifiedDomainName\":\"na\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"ejnglpwsadaxjsum\"},\"certificateUrl\":\"ezcoioyj\",\"expectedTxtRecordName\":\"fqzwqdnxkeed\",\"expectedTxtRecordValue\":\"wmywxfqzkvemy\"},{\"fullyQualifiedDomainName\":\"dpczaqpqifd\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"xzuisamona\"},\"certificateUrl\":\"izexroqsqj\",\"expectedTxtRecordName\":\"rmthsplwst\",\"expectedTxtRecordValue\":\"srgxfq\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CustomDomainOwnershipValidationResult response = manager.namespaces() - .validateCustomDomainOwnership("znsvlrd", "movpimyndnoxax", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("aqotnndxolousdv", - response.customDomainsForTopicsConfiguration().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.PENDING, - response.customDomainsForTopicsConfiguration().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, - response.customDomainsForTopicsConfiguration().get(0).identity().type()); - Assertions.assertEquals("wz", - response.customDomainsForTopicsConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("rp", response.customDomainsForTopicsConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("fu", response.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("yctsdbtqgkuj", - response.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordValue()); - Assertions.assertEquals("na", - response.customDomainsForTopicSpacesConfiguration().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD, - response.customDomainsForTopicSpacesConfiguration().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, - response.customDomainsForTopicSpacesConfiguration().get(0).identity().type()); - Assertions.assertEquals("ejnglpwsadaxjsum", - response.customDomainsForTopicSpacesConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("ezcoioyj", - response.customDomainsForTopicSpacesConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("fqzwqdnxkeed", - response.customDomainsForTopicSpacesConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("wmywxfqzkvemy", - response.customDomainsForTopicSpacesConfiguration().get(0).expectedTxtRecordValue()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationInnerTests.java deleted file mode 100644 index 89f3a61a885d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationInnerTests.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterAssociationAccessMode; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssues; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationProfile; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRule; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRuleDirection; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterSubscription; -import com.azure.resourcemanager.eventgrid.models.ResourceAssociation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSecurityPerimeterConfigurationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterConfigurationInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"provisioningIssues\":[{\"name\":\"dzqavbpdqmjxlyyz\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Error\",\"description\":\"lmjjyuo\",\"suggestedResourceIds\":[\"obaxkjeytu\"],\"suggestedAccessRules\":[\"fjkwrusnkq\",\"hsyrqunj\"]}},{\"name\":\"denxau\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Warning\",\"description\":\"ifmjnn\",\"suggestedResourceIds\":[\"qabpxuckpggqow\",\"yirdhlisngwflqq\",\"pizruwnpqxpxiw\"],\"suggestedAccessRules\":[\"gjsaasiixtm\",\"zjvkviirhgfgrws\"]}},{\"name\":\"gratzvzbglbyvict\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Warning\",\"description\":\"zwrgxffmshkwfbk\",\"suggestedResourceIds\":[\"xwopdbydpizqa\",\"lnapxbiygn\",\"gjkn\",\"smfcttuxuuyilfl\"],\"suggestedAccessRules\":[\"quvre\",\"mrnjh\"]}}],\"networkSecurityPerimeter\":{\"id\":\"jztczytqj\",\"perimeterGuid\":\"h\",\"location\":\"unfprnjletlxs\"},\"resourceAssociation\":{\"name\":\"ddoui\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"aziynknlqwzdv\",\"accessRulesVersion\":\"w\",\"accessRules\":[{\"fullyQualifiedArmId\":\"zdtmaajquhuxylrj\",\"name\":\"ty\",\"type\":\"bmzyospsps\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"jpmspbpssdfppy\",\"gt\",\"eyujtvczkcnyxrx\",\"unjdx\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{},{}],\"fullyQualifiedDomainNames\":[\"lxpaglqivbgkcv\"],\"emailAddresses\":[\"zvuqdflvon\",\"yp\",\"pubcpzgpxtivhjk\"],\"phoneNumbers\":[\"ibg\",\"jxgpnrhgovfg\",\"ik\",\"mhha\"]}},{\"fullyQualifiedArmId\":\"jrmzvupor\",\"name\":\"dfuyd\",\"type\":\"kfvxcnq\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"okmvkhlggd\",\"bemzqkzszuwi\",\"tglxx\"],\"subscriptions\":[{},{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"icrmnzh\",\"gmqgjs\",\"vpqcb\",\"rmbodt\"],\"emailAddresses\":[\"qgvriibakcla\",\"jfrnxousxauzlwv\",\"gmwohqfzizvu\",\"mmkjsvthnwpztek\"],\"phoneNumbers\":[\"ribi\",\"ttgplucfotangcf\"]}},{\"fullyQualifiedArmId\":\"ykzcugswvxwl\",\"name\":\"qwm\",\"type\":\"xnjmxm\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"cvclxynpdk\",\"gfabuiyjibuzphdu\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"gox\",\"jiuqhibtozi\"],\"emailAddresses\":[\"jedmurrxxgewp\",\"tvqylkmqpzoyhlfb\",\"gwgcl\",\"xoe\"],\"phoneNumbers\":[\"njipnwjfujql\",\"fcbahhp\",\"pofoi\"]}},{\"fullyQualifiedArmId\":\"w\",\"name\":\"ilkmk\",\"type\":\"olvdnd\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"phuartv\",\"iukyefchnmna\",\"mnxhkxjqirwrweo\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"xwrsnew\"],\"emailAddresses\":[\"qvbubqmamhs\",\"cx\"],\"phoneNumbers\":[\"gaztt\"]}}],\"diagnosticSettingsVersion\":\"o\",\"enabledLogCategories\":[\"mfqhppubowse\",\"dfgkmtdh\",\"rngbtcjuahokqtob\"]}},\"id\":\"auxofshfph\",\"name\":\"pnulaiywzej\",\"type\":\"whslwkoj\"}") - .toObject(NetworkSecurityPerimeterConfigurationInner.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.CANCELED, model.provisioningState()); - Assertions.assertEquals("dzqavbpdqmjxlyyz", model.provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.MISSING_IDENTITY_CONFIGURATION, - model.provisioningIssues().get(0).issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, - model.provisioningIssues().get(0).severity()); - Assertions.assertEquals("lmjjyuo", model.provisioningIssues().get(0).description()); - Assertions.assertEquals("obaxkjeytu", model.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("fjkwrusnkq", model.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("jztczytqj", model.networkSecurityPerimeter().id()); - Assertions.assertEquals("h", model.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("unfprnjletlxs", model.networkSecurityPerimeter().location()); - Assertions.assertEquals("ddoui", model.resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, - model.resourceAssociation().accessMode()); - Assertions.assertEquals("aziynknlqwzdv", model.profile().name()); - Assertions.assertEquals("w", model.profile().accessRulesVersion()); - Assertions.assertEquals("zdtmaajquhuxylrj", model.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("ty", model.profile().accessRules().get(0).name()); - Assertions.assertEquals("bmzyospsps", model.profile().accessRules().get(0).type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND, - model.profile().accessRules().get(0).direction()); - Assertions.assertEquals("jpmspbpssdfppy", model.profile().accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("lxpaglqivbgkcv", - model.profile().accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("zvuqdflvon", model.profile().accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("ibg", model.profile().accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("o", model.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("mfqhppubowse", model.profile().enabledLogCategories().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationInner model - = new NetworkSecurityPerimeterConfigurationInner() - .withProvisioningState(NetworkSecurityPerimeterConfigProvisioningState.CANCELED) - .withProvisioningIssues( - Arrays.asList( - new NetworkSecurityPerimeterConfigurationIssues().withName("dzqavbpdqmjxlyyz") - .withIssueType( - NetworkSecurityPerimeterConfigurationIssueType.MISSING_IDENTITY_CONFIGURATION) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR) - .withDescription("lmjjyuo") - .withSuggestedResourceIds(Arrays.asList("obaxkjeytu")) - .withSuggestedAccessRules(Arrays.asList("fjkwrusnkq", "hsyrqunj")), - new NetworkSecurityPerimeterConfigurationIssues().withName("denxau") - .withIssueType(NetworkSecurityPerimeterConfigurationIssueType.OTHER) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING) - .withDescription("ifmjnn") - .withSuggestedResourceIds( - Arrays.asList("qabpxuckpggqow", "yirdhlisngwflqq", "pizruwnpqxpxiw")) - .withSuggestedAccessRules(Arrays.asList("gjsaasiixtm", "zjvkviirhgfgrws")), - new NetworkSecurityPerimeterConfigurationIssues().withName("gratzvzbglbyvict") - .withIssueType(NetworkSecurityPerimeterConfigurationIssueType.OTHER) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING) - .withDescription("zwrgxffmshkwfbk") - .withSuggestedResourceIds( - Arrays.asList("xwopdbydpizqa", "lnapxbiygn", "gjkn", "smfcttuxuuyilfl")) - .withSuggestedAccessRules(Arrays.asList("quvre", "mrnjh")))) - .withNetworkSecurityPerimeter(new NetworkSecurityPerimeterInfo().withId("jztczytqj") - .withPerimeterGuid("h") - .withLocation("unfprnjletlxs")) - .withResourceAssociation(new ResourceAssociation().withName("ddoui") - .withAccessMode(NetworkSecurityPerimeterAssociationAccessMode.AUDIT)) - .withProfile(new NetworkSecurityPerimeterConfigurationProfile().withName("aziynknlqwzdv") - .withAccessRulesVersion("w") - .withAccessRules(Arrays.asList( - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("zdtmaajquhuxylrj") - .withName("ty") - .withType("bmzyospsps") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("jpmspbpssdfppy", "gt", "eyujtvczkcnyxrx", "unjdx")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters( - Arrays.asList(new NetworkSecurityPerimeterInfo(), new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames(Arrays.asList("lxpaglqivbgkcv")) - .withEmailAddresses(Arrays.asList("zvuqdflvon", "yp", "pubcpzgpxtivhjk")) - .withPhoneNumbers(Arrays.asList("ibg", "jxgpnrhgovfg", "ik", "mhha")), - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("jrmzvupor") - .withName("dfuyd") - .withType("kfvxcnq") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("okmvkhlggd", "bemzqkzszuwi", "tglxx")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription(), new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames(Arrays.asList("icrmnzh", "gmqgjs", "vpqcb", "rmbodt")) - .withEmailAddresses( - Arrays.asList("qgvriibakcla", "jfrnxousxauzlwv", "gmwohqfzizvu", "mmkjsvthnwpztek")) - .withPhoneNumbers(Arrays.asList("ribi", "ttgplucfotangcf")), - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("ykzcugswvxwl") - .withName("qwm") - .withType("xnjmxm") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("cvclxynpdk", "gfabuiyjibuzphdu")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo(), - new NetworkSecurityPerimeterInfo(), new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames(Arrays.asList("gox", "jiuqhibtozi")) - .withEmailAddresses(Arrays.asList("jedmurrxxgewp", "tvqylkmqpzoyhlfb", "gwgcl", "xoe")) - .withPhoneNumbers(Arrays.asList("njipnwjfujql", "fcbahhp", "pofoi")), - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("w") - .withName("ilkmk") - .withType("olvdnd") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("phuartv", "iukyefchnmna", "mnxhkxjqirwrweo")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames(Arrays.asList("xwrsnew")) - .withEmailAddresses(Arrays.asList("qvbubqmamhs", "cx")) - .withPhoneNumbers(Arrays.asList("gaztt")))) - .withDiagnosticSettingsVersion("o") - .withEnabledLogCategories(Arrays.asList("mfqhppubowse", "dfgkmtdh", "rngbtcjuahokqtob"))); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationInner.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.CANCELED, model.provisioningState()); - Assertions.assertEquals("dzqavbpdqmjxlyyz", model.provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.MISSING_IDENTITY_CONFIGURATION, - model.provisioningIssues().get(0).issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, - model.provisioningIssues().get(0).severity()); - Assertions.assertEquals("lmjjyuo", model.provisioningIssues().get(0).description()); - Assertions.assertEquals("obaxkjeytu", model.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("fjkwrusnkq", model.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("jztczytqj", model.networkSecurityPerimeter().id()); - Assertions.assertEquals("h", model.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("unfprnjletlxs", model.networkSecurityPerimeter().location()); - Assertions.assertEquals("ddoui", model.resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, - model.resourceAssociation().accessMode()); - Assertions.assertEquals("aziynknlqwzdv", model.profile().name()); - Assertions.assertEquals("w", model.profile().accessRulesVersion()); - Assertions.assertEquals("zdtmaajquhuxylrj", model.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("ty", model.profile().accessRules().get(0).name()); - Assertions.assertEquals("bmzyospsps", model.profile().accessRules().get(0).type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND, - model.profile().accessRules().get(0).direction()); - Assertions.assertEquals("jpmspbpssdfppy", model.profile().accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("lxpaglqivbgkcv", - model.profile().accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("zvuqdflvon", model.profile().accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("ibg", model.profile().accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("o", model.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("mfqhppubowse", model.profile().enabledLogCategories().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationIssuesPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationIssuesPropertiesTests.java deleted file mode 100644 index c176778e4e8b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationIssuesPropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationIssuesProperties; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSecurityPerimeterConfigurationIssuesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterConfigurationIssuesProperties model = BinaryData.fromString( - "{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"nchrszizoyu\",\"suggestedResourceIds\":[\"etndnbfqyggagf\",\"nlgmtrwahzjmu\"],\"suggestedAccessRules\":[\"byrplrohkpig\"]}") - .toObject(NetworkSecurityPerimeterConfigurationIssuesProperties.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.CONFIGURATION_PROPAGATION_FAILURE, - model.issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING, model.severity()); - Assertions.assertEquals("nchrszizoyu", model.description()); - Assertions.assertEquals("etndnbfqyggagf", model.suggestedResourceIds().get(0)); - Assertions.assertEquals("byrplrohkpig", model.suggestedAccessRules().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationIssuesProperties model - = new NetworkSecurityPerimeterConfigurationIssuesProperties() - .withIssueType(NetworkSecurityPerimeterConfigurationIssueType.CONFIGURATION_PROPAGATION_FAILURE) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING) - .withDescription("nchrszizoyu") - .withSuggestedResourceIds(Arrays.asList("etndnbfqyggagf", "nlgmtrwahzjmu")) - .withSuggestedAccessRules(Arrays.asList("byrplrohkpig")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationIssuesProperties.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.CONFIGURATION_PROPAGATION_FAILURE, - model.issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING, model.severity()); - Assertions.assertEquals("nchrszizoyu", model.description()); - Assertions.assertEquals("etndnbfqyggagf", model.suggestedResourceIds().get(0)); - Assertions.assertEquals("byrplrohkpig", model.suggestedAccessRules().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationIssuesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationIssuesTests.java deleted file mode 100644 index be25ec1d48e9..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationIssuesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssues; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSecurityPerimeterConfigurationIssuesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterConfigurationIssues model = BinaryData.fromString( - "{\"name\":\"tvwkpqhjpenu\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"ekewvnqvcdlguauc\",\"suggestedResourceIds\":[\"jwnlax\",\"un\",\"qikczvvita\",\"gx\"],\"suggestedAccessRules\":[\"sserxhtvsoxhlwn\",\"sjgqrsxyp\"]}}") - .toObject(NetworkSecurityPerimeterConfigurationIssues.class); - Assertions.assertEquals("tvwkpqhjpenu", model.name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.OTHER, model.issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, model.severity()); - Assertions.assertEquals("ekewvnqvcdlguauc", model.description()); - Assertions.assertEquals("jwnlax", model.suggestedResourceIds().get(0)); - Assertions.assertEquals("sserxhtvsoxhlwn", model.suggestedAccessRules().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationIssues model - = new NetworkSecurityPerimeterConfigurationIssues().withName("tvwkpqhjpenu") - .withIssueType(NetworkSecurityPerimeterConfigurationIssueType.OTHER) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR) - .withDescription("ekewvnqvcdlguauc") - .withSuggestedResourceIds(Arrays.asList("jwnlax", "un", "qikczvvita", "gx")) - .withSuggestedAccessRules(Arrays.asList("sserxhtvsoxhlwn", "sjgqrsxyp")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationIssues.class); - Assertions.assertEquals("tvwkpqhjpenu", model.name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.OTHER, model.issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, model.severity()); - Assertions.assertEquals("ekewvnqvcdlguauc", model.description()); - Assertions.assertEquals("jwnlax", model.suggestedResourceIds().get(0)); - Assertions.assertEquals("sserxhtvsoxhlwn", model.suggestedAccessRules().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationListTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationListTests.java deleted file mode 100644 index 0c7de2a0c731..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationListTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterAssociationAccessMode; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssues; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationList; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationProfile; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRule; -import com.azure.resourcemanager.eventgrid.models.ResourceAssociation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSecurityPerimeterConfigurationListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterConfigurationList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"provisioningIssues\":[{\"name\":\"veo\",\"properties\":{}},{\"name\":\"rvjfnmjmvlw\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"blkujrllfojuidjp\",\"perimeterGuid\":\"yjucejikzoeo\",\"location\":\"tzejetjklnt\"},\"resourceAssociation\":{\"name\":\"juzkdbqz\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"vhqjwtrhtgvg\",\"accessRulesVersion\":\"c\",\"accessRules\":[{},{},{},{}],\"diagnosticSettingsVersion\":\"lawjmjsmwrok\",\"enabledLogCategories\":[\"fzzzwyjafitlhg\",\"ynuchlgmltxd\",\"hmoz\",\"sgzv\"]}},\"id\":\"ns\",\"name\":\"nj\",\"type\":\"fpafolpymwamxq\"}],\"nextLink\":\"agpgdph\"}") - .toObject(NetworkSecurityPerimeterConfigurationList.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.FAILED, - model.value().get(0).provisioningState()); - Assertions.assertEquals("veo", model.value().get(0).provisioningIssues().get(0).name()); - Assertions.assertEquals("blkujrllfojuidjp", model.value().get(0).networkSecurityPerimeter().id()); - Assertions.assertEquals("yjucejikzoeo", model.value().get(0).networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("tzejetjklnt", model.value().get(0).networkSecurityPerimeter().location()); - Assertions.assertEquals("juzkdbqz", model.value().get(0).resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, - model.value().get(0).resourceAssociation().accessMode()); - Assertions.assertEquals("vhqjwtrhtgvg", model.value().get(0).profile().name()); - Assertions.assertEquals("c", model.value().get(0).profile().accessRulesVersion()); - Assertions.assertEquals("lawjmjsmwrok", model.value().get(0).profile().diagnosticSettingsVersion()); - Assertions.assertEquals("fzzzwyjafitlhg", model.value().get(0).profile().enabledLogCategories().get(0)); - Assertions.assertEquals("agpgdph", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationList model = new NetworkSecurityPerimeterConfigurationList() - .withValue(Arrays.asList(new NetworkSecurityPerimeterConfigurationInner() - .withProvisioningState(NetworkSecurityPerimeterConfigProvisioningState.FAILED) - .withProvisioningIssues(Arrays.asList(new NetworkSecurityPerimeterConfigurationIssues().withName("veo"), - new NetworkSecurityPerimeterConfigurationIssues().withName("rvjfnmjmvlw"))) - .withNetworkSecurityPerimeter(new NetworkSecurityPerimeterInfo().withId("blkujrllfojuidjp") - .withPerimeterGuid("yjucejikzoeo") - .withLocation("tzejetjklnt")) - .withResourceAssociation(new ResourceAssociation().withName("juzkdbqz") - .withAccessMode(NetworkSecurityPerimeterAssociationAccessMode.AUDIT)) - .withProfile(new NetworkSecurityPerimeterConfigurationProfile().withName("vhqjwtrhtgvg") - .withAccessRulesVersion("c") - .withAccessRules(Arrays.asList(new NetworkSecurityPerimeterProfileAccessRule(), - new NetworkSecurityPerimeterProfileAccessRule(), - new NetworkSecurityPerimeterProfileAccessRule(), - new NetworkSecurityPerimeterProfileAccessRule())) - .withDiagnosticSettingsVersion("lawjmjsmwrok") - .withEnabledLogCategories(Arrays.asList("fzzzwyjafitlhg", "ynuchlgmltxd", "hmoz", "sgzv"))))) - .withNextLink("agpgdph"); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationList.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.FAILED, - model.value().get(0).provisioningState()); - Assertions.assertEquals("veo", model.value().get(0).provisioningIssues().get(0).name()); - Assertions.assertEquals("blkujrllfojuidjp", model.value().get(0).networkSecurityPerimeter().id()); - Assertions.assertEquals("yjucejikzoeo", model.value().get(0).networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("tzejetjklnt", model.value().get(0).networkSecurityPerimeter().location()); - Assertions.assertEquals("juzkdbqz", model.value().get(0).resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, - model.value().get(0).resourceAssociation().accessMode()); - Assertions.assertEquals("vhqjwtrhtgvg", model.value().get(0).profile().name()); - Assertions.assertEquals("c", model.value().get(0).profile().accessRulesVersion()); - Assertions.assertEquals("lawjmjsmwrok", model.value().get(0).profile().diagnosticSettingsVersion()); - Assertions.assertEquals("fzzzwyjafitlhg", model.value().get(0).profile().enabledLogCategories().get(0)); - Assertions.assertEquals("agpgdph", model.nextLink()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationProfileTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationProfileTests.java deleted file mode 100644 index bbaf85e20bf9..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationProfileTests.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationProfile; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRule; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRuleDirection; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterSubscription; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSecurityPerimeterConfigurationProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterConfigurationProfile model = BinaryData.fromString( - "{\"name\":\"narfdlpukhpyrn\",\"accessRulesVersion\":\"zjcpeogk\",\"accessRules\":[{\"fullyQualifiedArmId\":\"brouxdd\",\"name\":\"fhp\",\"type\":\"azjzo\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"dulontacn\",\"qwtehtuevr\"],\"subscriptions\":[{\"id\":\"yoogw\"},{\"id\":\"nsduugwbsre\"}],\"networkSecurityPerimeters\":[{\"id\":\"kfuarenlv\",\"perimeterGuid\":\"tklnvnafvvkyfed\",\"location\":\"jboslcqxypok\"},{\"id\":\"minqcym\",\"perimeterGuid\":\"ngnbdxxew\",\"location\":\"invudbch\"},{\"id\":\"dtvqe\",\"perimeterGuid\":\"qct\",\"location\":\"xdtddmflhuytxzv\"}],\"fullyQualifiedDomainNames\":[\"apxbannovvoxczy\",\"prwnwvroevytlyo\",\"rrrouuxvnsa\"],\"emailAddresses\":[\"rymo\",\"izrxklob\",\"xnazpmkml\",\"vevfxz\"],\"phoneNumbers\":[\"hbzxli\",\"hrdd\",\"tfgxqbawpcb\",\"nzqcy\"]}},{\"fullyQualifiedArmId\":\"apqofyuicdhz\",\"name\":\"ybww\",\"type\":\"d\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"hmwffplfmuv\",\"pckc\"],\"subscriptions\":[{\"id\":\"weyoxoy\"}],\"networkSecurityPerimeters\":[{\"id\":\"haim\",\"perimeterGuid\":\"iroqbosh\",\"location\":\"a\"}],\"fullyQualifiedDomainNames\":[\"yyrmfsvbp\",\"vbopfppdbwnu\"],\"emailAddresses\":[\"hxkumasjcaacfdmm\",\"pugmehqe\"],\"phoneNumbers\":[\"fhbzehewhoqhn\"]}}],\"diagnosticSettingsVersion\":\"qnbldxe\",\"enabledLogCategories\":[\"gschorimkrsrr\"]}") - .toObject(NetworkSecurityPerimeterConfigurationProfile.class); - Assertions.assertEquals("narfdlpukhpyrn", model.name()); - Assertions.assertEquals("zjcpeogk", model.accessRulesVersion()); - Assertions.assertEquals("brouxdd", model.accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("fhp", model.accessRules().get(0).name()); - Assertions.assertEquals("azjzo", model.accessRules().get(0).type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND, - model.accessRules().get(0).direction()); - Assertions.assertEquals("dulontacn", model.accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("yoogw", model.accessRules().get(0).subscriptions().get(0).id()); - Assertions.assertEquals("kfuarenlv", model.accessRules().get(0).networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("tklnvnafvvkyfed", - model.accessRules().get(0).networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("jboslcqxypok", - model.accessRules().get(0).networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("apxbannovvoxczy", model.accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("rymo", model.accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("hbzxli", model.accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("qnbldxe", model.diagnosticSettingsVersion()); - Assertions.assertEquals("gschorimkrsrr", model.enabledLogCategories().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationProfile model = new NetworkSecurityPerimeterConfigurationProfile() - .withName("narfdlpukhpyrn") - .withAccessRulesVersion("zjcpeogk") - .withAccessRules(Arrays.asList( - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("brouxdd") - .withName("fhp") - .withType("azjzo") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("dulontacn", "qwtehtuevr")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription().withId("yoogw"), - new NetworkSecurityPerimeterSubscription().withId("nsduugwbsre"))) - .withNetworkSecurityPerimeters(Arrays.asList( - new NetworkSecurityPerimeterInfo().withId("kfuarenlv") - .withPerimeterGuid("tklnvnafvvkyfed") - .withLocation("jboslcqxypok"), - new NetworkSecurityPerimeterInfo().withId("minqcym") - .withPerimeterGuid("ngnbdxxew") - .withLocation("invudbch"), - new NetworkSecurityPerimeterInfo().withId("dtvqe") - .withPerimeterGuid("qct") - .withLocation("xdtddmflhuytxzv"))) - .withFullyQualifiedDomainNames(Arrays.asList("apxbannovvoxczy", "prwnwvroevytlyo", "rrrouuxvnsa")) - .withEmailAddresses(Arrays.asList("rymo", "izrxklob", "xnazpmkml", "vevfxz")) - .withPhoneNumbers(Arrays.asList("hbzxli", "hrdd", "tfgxqbawpcb", "nzqcy")), - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("apqofyuicdhz") - .withName("ybww") - .withType("d") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("hmwffplfmuv", "pckc")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription().withId("weyoxoy"))) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo().withId("haim") - .withPerimeterGuid("iroqbosh") - .withLocation("a"))) - .withFullyQualifiedDomainNames(Arrays.asList("yyrmfsvbp", "vbopfppdbwnu")) - .withEmailAddresses(Arrays.asList("hxkumasjcaacfdmm", "pugmehqe")) - .withPhoneNumbers(Arrays.asList("fhbzehewhoqhn")))) - .withDiagnosticSettingsVersion("qnbldxe") - .withEnabledLogCategories(Arrays.asList("gschorimkrsrr")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationProfile.class); - Assertions.assertEquals("narfdlpukhpyrn", model.name()); - Assertions.assertEquals("zjcpeogk", model.accessRulesVersion()); - Assertions.assertEquals("brouxdd", model.accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("fhp", model.accessRules().get(0).name()); - Assertions.assertEquals("azjzo", model.accessRules().get(0).type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND, - model.accessRules().get(0).direction()); - Assertions.assertEquals("dulontacn", model.accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("yoogw", model.accessRules().get(0).subscriptions().get(0).id()); - Assertions.assertEquals("kfuarenlv", model.accessRules().get(0).networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("tklnvnafvvkyfed", - model.accessRules().get(0).networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("jboslcqxypok", - model.accessRules().get(0).networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("apxbannovvoxczy", model.accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("rymo", model.accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("hbzxli", model.accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("qnbldxe", model.diagnosticSettingsVersion()); - Assertions.assertEquals("gschorimkrsrr", model.enabledLogCategories().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java deleted file mode 100644 index 72cb60396903..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationProperties; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterAssociationAccessMode; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssues; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationProfile; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRule; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRuleDirection; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterSubscription; -import com.azure.resourcemanager.eventgrid.models.ResourceAssociation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSecurityPerimeterConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterConfigurationProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Creating\",\"provisioningIssues\":[{\"name\":\"pdwrpqafgfugsn\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Error\",\"description\":\"fypococtfjgti\",\"suggestedResourceIds\":[\"vzuyturmlmu\",\"wolba\"],\"suggestedAccessRules\":[\"opionszon\",\"pngajin\"]}},{\"name\":\"xjawrt\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"cxlzhcoxovnekh\",\"suggestedResourceIds\":[\"usfnr\",\"tjxtxr\",\"cq\",\"jvidttge\"],\"suggestedAccessRules\":[\"lvyjtcvuwkas\",\"zies\",\"uughtuqfecjxeyg\",\"uhxu\"]}},{\"name\":\"buew\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"xuzrhwpusxjba\",\"suggestedResourceIds\":[\"gpdohzj\",\"atucoigebxncn\"],\"suggestedAccessRules\":[\"pbnwgfmxjgcg\",\"jbgdlfgtdysnaquf\"]}}],\"networkSecurityPerimeter\":{\"id\":\"ctqhamzjrwdk\",\"perimeterGuid\":\"eqyj\",\"location\":\"zi\"},\"resourceAssociation\":{\"name\":\"xdfzantkw\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"mlbnseq\",\"accessRulesVersion\":\"jjvpilguooqja\",\"accessRules\":[{\"fullyQualifiedArmId\":\"tg\",\"name\":\"iookjbsah\",\"type\":\"dt\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"cslmotoebnfxo\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"irazftxejwabmd\",\"jtmvc\"],\"emailAddresses\":[\"xcmjurbu\",\"hlkyqltqsrog\",\"uwkffdjktsysid\"],\"phoneNumbers\":[\"lglxnfui\"]}}],\"diagnosticSettingsVersion\":\"kbusqo\",\"enabledLogCategories\":[\"ikayiansharuj\",\"ji\",\"xfz\",\"j\"]}}") - .toObject(NetworkSecurityPerimeterConfigurationProperties.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.CREATING, model.provisioningState()); - Assertions.assertEquals("pdwrpqafgfugsn", model.provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.MISSING_IDENTITY_CONFIGURATION, - model.provisioningIssues().get(0).issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, - model.provisioningIssues().get(0).severity()); - Assertions.assertEquals("fypococtfjgti", model.provisioningIssues().get(0).description()); - Assertions.assertEquals("vzuyturmlmu", model.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("opionszon", model.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("ctqhamzjrwdk", model.networkSecurityPerimeter().id()); - Assertions.assertEquals("eqyj", model.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("zi", model.networkSecurityPerimeter().location()); - Assertions.assertEquals("xdfzantkw", model.resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, - model.resourceAssociation().accessMode()); - Assertions.assertEquals("mlbnseq", model.profile().name()); - Assertions.assertEquals("jjvpilguooqja", model.profile().accessRulesVersion()); - Assertions.assertEquals("tg", model.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("iookjbsah", model.profile().accessRules().get(0).name()); - Assertions.assertEquals("dt", model.profile().accessRules().get(0).type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, - model.profile().accessRules().get(0).direction()); - Assertions.assertEquals("cslmotoebnfxo", model.profile().accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("irazftxejwabmd", - model.profile().accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("xcmjurbu", model.profile().accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("lglxnfui", model.profile().accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("kbusqo", model.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("ikayiansharuj", model.profile().enabledLogCategories().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationProperties model - = new NetworkSecurityPerimeterConfigurationProperties() - .withProvisioningState(NetworkSecurityPerimeterConfigProvisioningState.CREATING) - .withProvisioningIssues( - Arrays.asList( - new NetworkSecurityPerimeterConfigurationIssues().withName("pdwrpqafgfugsn") - .withIssueType( - NetworkSecurityPerimeterConfigurationIssueType.MISSING_IDENTITY_CONFIGURATION) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR) - .withDescription("fypococtfjgti") - .withSuggestedResourceIds(Arrays.asList("vzuyturmlmu", "wolba")) - .withSuggestedAccessRules(Arrays.asList("opionszon", "pngajin")), - new NetworkSecurityPerimeterConfigurationIssues().withName("xjawrt") - .withIssueType(NetworkSecurityPerimeterConfigurationIssueType.OTHER) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR) - .withDescription("cxlzhcoxovnekh") - .withSuggestedResourceIds(Arrays.asList("usfnr", "tjxtxr", "cq", "jvidttge")) - .withSuggestedAccessRules(Arrays.asList("lvyjtcvuwkas", "zies", "uughtuqfecjxeyg", "uhxu")), - new NetworkSecurityPerimeterConfigurationIssues().withName("buew") - .withIssueType( - NetworkSecurityPerimeterConfigurationIssueType.MISSING_IDENTITY_CONFIGURATION) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING) - .withDescription("xuzrhwpusxjba") - .withSuggestedResourceIds(Arrays.asList("gpdohzj", "atucoigebxncn")) - .withSuggestedAccessRules(Arrays.asList("pbnwgfmxjgcg", "jbgdlfgtdysnaquf")))) - .withNetworkSecurityPerimeter(new NetworkSecurityPerimeterInfo().withId("ctqhamzjrwdk") - .withPerimeterGuid("eqyj") - .withLocation("zi")) - .withResourceAssociation(new ResourceAssociation().withName("xdfzantkw") - .withAccessMode(NetworkSecurityPerimeterAssociationAccessMode.AUDIT)) - .withProfile( - new NetworkSecurityPerimeterConfigurationProfile().withName("mlbnseq") - .withAccessRulesVersion("jjvpilguooqja") - .withAccessRules(Arrays.asList(new NetworkSecurityPerimeterProfileAccessRule() - .withFullyQualifiedArmId("tg") - .withName("iookjbsah") - .withType("dt") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("cslmotoebnfxo")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription(), new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames(Arrays.asList("irazftxejwabmd", "jtmvc")) - .withEmailAddresses(Arrays.asList("xcmjurbu", "hlkyqltqsrog", "uwkffdjktsysid")) - .withPhoneNumbers(Arrays.asList("lglxnfui")))) - .withDiagnosticSettingsVersion("kbusqo") - .withEnabledLogCategories(Arrays.asList("ikayiansharuj", "ji", "xfz", "j"))); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationProperties.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.CREATING, model.provisioningState()); - Assertions.assertEquals("pdwrpqafgfugsn", model.provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.MISSING_IDENTITY_CONFIGURATION, - model.provisioningIssues().get(0).issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, - model.provisioningIssues().get(0).severity()); - Assertions.assertEquals("fypococtfjgti", model.provisioningIssues().get(0).description()); - Assertions.assertEquals("vzuyturmlmu", model.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("opionszon", model.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("ctqhamzjrwdk", model.networkSecurityPerimeter().id()); - Assertions.assertEquals("eqyj", model.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("zi", model.networkSecurityPerimeter().location()); - Assertions.assertEquals("xdfzantkw", model.resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, - model.resourceAssociation().accessMode()); - Assertions.assertEquals("mlbnseq", model.profile().name()); - Assertions.assertEquals("jjvpilguooqja", model.profile().accessRulesVersion()); - Assertions.assertEquals("tg", model.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("iookjbsah", model.profile().accessRules().get(0).name()); - Assertions.assertEquals("dt", model.profile().accessRules().get(0).type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, - model.profile().accessRules().get(0).direction()); - Assertions.assertEquals("cslmotoebnfxo", model.profile().accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("irazftxejwabmd", - model.profile().accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("xcmjurbu", model.profile().accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("lglxnfui", model.profile().accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("kbusqo", model.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("ikayiansharuj", model.profile().enabledLogCategories().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java deleted file mode 100644 index b6a8f2693ce2..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterAssociationAccessMode; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfiguration; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"provisioningIssues\":[{\"name\":\"qwqajqu\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"oipnfdb\",\"suggestedResourceIds\":[\"sci\",\"nezfvbennmfkbpj\",\"rtek\"],\"suggestedAccessRules\":[\"thr\",\"pmdudsyiurzt\",\"ktjhffe\",\"q\"]}},{\"name\":\"qyouerg\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"kpyehhfdyldh\",\"suggestedResourceIds\":[\"d\",\"fzqiyuq\",\"tdereunokakzw\",\"pjlwyxe\"],\"suggestedAccessRules\":[\"mxrfomckew\",\"my\",\"fopxf\",\"jt\"]}}],\"networkSecurityPerimeter\":{\"id\":\"z\",\"perimeterGuid\":\"txfp\",\"location\":\"fhgnuywezygv\"},\"resourceAssociation\":{\"name\":\"aaqwvkg\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"mpvdnogeh\",\"accessRulesVersion\":\"fbortbnukk\",\"accessRules\":[{\"fullyQualifiedArmId\":\"svbxxyjisskob\",\"name\":\"clflioe\",\"type\":\"hxessmvrk\",\"properties\":{}},{\"fullyQualifiedArmId\":\"qeq\",\"name\":\"dxmdses\",\"type\":\"ujbjppp\",\"properties\":{}},{\"fullyQualifiedArmId\":\"pdibfmthi\",\"name\":\"tnejrnminzqp\",\"type\":\"tkihonikzs\",\"properties\":{}}],\"diagnosticSettingsVersion\":\"ffjilzfbpnt\",\"enabledLogCategories\":[\"ensckhbmcarm\",\"yfxxkwykuqdnd\"]}},\"id\":\"lykhkg\",\"name\":\"apvd\",\"type\":\"t\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkSecurityPerimeterConfiguration response = manager.networkSecurityPerimeterConfigurations() - .getWithResponse("fwkztsms", NetworkSecurityPerimeterResourceType.TOPICS, "evyllznfhkqyt", "ztadopgfz", - "gjfcycrsvloyyh", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.UPDATING, response.provisioningState()); - Assertions.assertEquals("qwqajqu", response.provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.OTHER, - response.provisioningIssues().get(0).issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, - response.provisioningIssues().get(0).severity()); - Assertions.assertEquals("oipnfdb", response.provisioningIssues().get(0).description()); - Assertions.assertEquals("sci", response.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("thr", response.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("z", response.networkSecurityPerimeter().id()); - Assertions.assertEquals("txfp", response.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("fhgnuywezygv", response.networkSecurityPerimeter().location()); - Assertions.assertEquals("aaqwvkg", response.resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.ENFORCED, - response.resourceAssociation().accessMode()); - Assertions.assertEquals("mpvdnogeh", response.profile().name()); - Assertions.assertEquals("fbortbnukk", response.profile().accessRulesVersion()); - Assertions.assertEquals("svbxxyjisskob", response.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("clflioe", response.profile().accessRules().get(0).name()); - Assertions.assertEquals("hxessmvrk", response.profile().accessRules().get(0).type()); - Assertions.assertEquals("ffjilzfbpnt", response.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("ensckhbmcarm", response.profile().enabledLogCategories().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java deleted file mode 100644 index 11b1cdc31ab4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterAssociationAccessMode; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfiguration; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetworkSecurityPerimeterConfigurationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"provisioningIssues\":[{\"name\":\"rehjuqwvapx\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Warning\",\"description\":\"hacen\",\"suggestedResourceIds\":[\"lxnqzubfonfdbgmk\",\"wmjcwtewfhxw\",\"rk\"],\"suggestedAccessRules\":[\"hzlrynjpchamkae\",\"lr\"]}},{\"name\":\"ubowuywevtj\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Error\",\"description\":\"l\",\"suggestedResourceIds\":[\"lfnisyxg\",\"cbmtredscnnst\",\"cyyuvtzrxzhclec\",\"wtzqzcloyhy\"],\"suggestedAccessRules\":[\"idhz\"]}}],\"networkSecurityPerimeter\":{\"id\":\"esgzs\",\"perimeterGuid\":\"mwb\",\"location\":\"r\"},\"resourceAssociation\":{\"name\":\"bchycha\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"bqvum\",\"accessRulesVersion\":\"qj\",\"accessRules\":[{\"fullyQualifiedArmId\":\"pmaxfnzlpqmpf\",\"name\":\"efvulblmr\",\"type\":\"xyprhfcaeooifqdy\",\"properties\":{}}],\"diagnosticSettingsVersion\":\"lobha\",\"enabledLogCategories\":[\"omfecorkfro\",\"gbmxldjmz\",\"zbjesylslur\",\"qfygpny\"]}},\"id\":\"gdz\",\"name\":\"qscag\",\"type\":\"yvouprsytq\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.networkSecurityPerimeterConfigurations() - .list("rletndqlmf", NetworkSecurityPerimeterResourceType.DOMAINS, "gnbbuypwovvvsfle", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.FAILED, - response.iterator().next().provisioningState()); - Assertions.assertEquals("rehjuqwvapx", response.iterator().next().provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.OTHER, - response.iterator().next().provisioningIssues().get(0).issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING, - response.iterator().next().provisioningIssues().get(0).severity()); - Assertions.assertEquals("hacen", response.iterator().next().provisioningIssues().get(0).description()); - Assertions.assertEquals("lxnqzubfonfdbgmk", - response.iterator().next().provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("hzlrynjpchamkae", - response.iterator().next().provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("esgzs", response.iterator().next().networkSecurityPerimeter().id()); - Assertions.assertEquals("mwb", response.iterator().next().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("r", response.iterator().next().networkSecurityPerimeter().location()); - Assertions.assertEquals("bchycha", response.iterator().next().resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.ENFORCED, - response.iterator().next().resourceAssociation().accessMode()); - Assertions.assertEquals("bqvum", response.iterator().next().profile().name()); - Assertions.assertEquals("qj", response.iterator().next().profile().accessRulesVersion()); - Assertions.assertEquals("pmaxfnzlpqmpf", - response.iterator().next().profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("efvulblmr", response.iterator().next().profile().accessRules().get(0).name()); - Assertions.assertEquals("xyprhfcaeooifqdy", response.iterator().next().profile().accessRules().get(0).type()); - Assertions.assertEquals("lobha", response.iterator().next().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("omfecorkfro", response.iterator().next().profile().enabledLogCategories().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java deleted file mode 100644 index 415037bf181a..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterAssociationAccessMode; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfiguration; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetworkSecurityPerimeterConfigurationsReconcileMockTests { - @Test - public void testReconcile() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"qmlfv\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Error\",\"description\":\"qjmxpt\",\"suggestedResourceIds\":[\"puugkw\",\"rq\",\"rpahuuonjkkxuk\"],\"suggestedAccessRules\":[\"hvvpx\"]}},{\"name\":\"egcjojlleuid\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"gnhtmeplhbpjbap\",\"suggestedResourceIds\":[\"mmkvav\",\"c\",\"jiuaiqpmnufzh\",\"chxwwuzdmh\"],\"suggestedAccessRules\":[\"vivjm\",\"mlitqdsj\"]}},{\"name\":\"dvisco\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"fefndslvrqoemwsi\",\"suggestedResourceIds\":[\"ilwdqmqfy\",\"eotmf\",\"lkdlgwgna\"],\"suggestedAccessRules\":[\"u\",\"i\"]}}],\"networkSecurityPerimeter\":{\"id\":\"afixlxicwgpthd\",\"perimeterGuid\":\"mfzcfasfodropalv\",\"location\":\"tw\"},\"resourceAssociation\":{\"name\":\"kwgqrn\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"rcjlvkrkegtyczup\",\"accessRulesVersion\":\"yxlz\",\"accessRules\":[{\"fullyQualifiedArmId\":\"deeqzqvabmh\",\"name\":\"exduetbapfczew\",\"type\":\"rlqbpxyazkjpir\",\"properties\":{}},{\"fullyQualifiedArmId\":\"vbczwhyegb\",\"name\":\"msritjbuiggr\",\"type\":\"ozfvualjt\",\"properties\":{}}],\"diagnosticSettingsVersion\":\"vsdwsngkrfihscj\",\"enabledLogCategories\":[\"mhzbhwahfbwih\",\"nnx\"]}},\"id\":\"mvynuqqko\",\"name\":\"auratni\",\"type\":\"ppfzsclef\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkSecurityPerimeterConfiguration response = manager.networkSecurityPerimeterConfigurations() - .reconcile("peerscd", NetworkSecurityPerimeterResourceType.DOMAINS, "nrnjrcuf", "bgacnr", "fdtncmspsanma", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.SUCCEEDED, - response.provisioningState()); - Assertions.assertEquals("qmlfv", response.provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.MISSING_IDENTITY_CONFIGURATION, - response.provisioningIssues().get(0).issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, - response.provisioningIssues().get(0).severity()); - Assertions.assertEquals("qjmxpt", response.provisioningIssues().get(0).description()); - Assertions.assertEquals("puugkw", response.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("hvvpx", response.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("afixlxicwgpthd", response.networkSecurityPerimeter().id()); - Assertions.assertEquals("mfzcfasfodropalv", response.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("tw", response.networkSecurityPerimeter().location()); - Assertions.assertEquals("kwgqrn", response.resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.ENFORCED, - response.resourceAssociation().accessMode()); - Assertions.assertEquals("rcjlvkrkegtyczup", response.profile().name()); - Assertions.assertEquals("yxlz", response.profile().accessRulesVersion()); - Assertions.assertEquals("deeqzqvabmh", response.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("exduetbapfczew", response.profile().accessRules().get(0).name()); - Assertions.assertEquals("rlqbpxyazkjpir", response.profile().accessRules().get(0).type()); - Assertions.assertEquals("vsdwsngkrfihscj", response.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("mhzbhwahfbwih", response.profile().enabledLogCategories().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterInfoTests.java deleted file mode 100644 index 53e0b55f122f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterInfoTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSecurityPerimeterInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterInfo model - = BinaryData.fromString("{\"id\":\"usuckzmkwklsno\",\"perimeterGuid\":\"xmqeqalh\",\"location\":\"nhg\"}") - .toObject(NetworkSecurityPerimeterInfo.class); - Assertions.assertEquals("usuckzmkwklsno", model.id()); - Assertions.assertEquals("xmqeqalh", model.perimeterGuid()); - Assertions.assertEquals("nhg", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterInfo model = new NetworkSecurityPerimeterInfo().withId("usuckzmkwklsno") - .withPerimeterGuid("xmqeqalh") - .withLocation("nhg"); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterInfo.class); - Assertions.assertEquals("usuckzmkwklsno", model.id()); - Assertions.assertEquals("xmqeqalh", model.perimeterGuid()); - Assertions.assertEquals("nhg", model.location()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterProfileAccessRulePropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterProfileAccessRulePropertiesTests.java deleted file mode 100644 index e055477e2aad..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterProfileAccessRulePropertiesTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterProfileAccessRuleProperties; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRuleDirection; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterSubscription; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSecurityPerimeterProfileAccessRulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterProfileAccessRuleProperties model = BinaryData.fromString( - "{\"direction\":\"Outbound\",\"addressPrefixes\":[\"ooclutnp\",\"memczjkmmyk\"],\"subscriptions\":[{\"id\":\"sglhsr\"},{\"id\":\"yejylmbkzudnigrf\"}],\"networkSecurityPerimeters\":[{\"id\":\"jewlpxuzzjg\",\"perimeterGuid\":\"efqyhqotoihiqaky\",\"location\":\"wf\"},{\"id\":\"kwpzdqtvh\",\"perimeterGuid\":\"podaq\",\"location\":\"sipi\"},{\"id\":\"gbebjf\",\"perimeterGuid\":\"bmoichd\",\"location\":\"nfpubntnbatz\"},{\"id\":\"qs\",\"perimeterGuid\":\"saaelca\",\"location\":\"cjuhplrvkm\"}],\"fullyQualifiedDomainNames\":[\"mjvlgfgg\"],\"emailAddresses\":[\"yylizrz\",\"jpsfxsfu\"],\"phoneNumbers\":[\"vtmva\"]}") - .toObject(NetworkSecurityPerimeterProfileAccessRuleProperties.class); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND, model.direction()); - Assertions.assertEquals("ooclutnp", model.addressPrefixes().get(0)); - Assertions.assertEquals("sglhsr", model.subscriptions().get(0).id()); - Assertions.assertEquals("jewlpxuzzjg", model.networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("efqyhqotoihiqaky", model.networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("wf", model.networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("mjvlgfgg", model.fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("yylizrz", model.emailAddresses().get(0)); - Assertions.assertEquals("vtmva", model.phoneNumbers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterProfileAccessRuleProperties model - = new NetworkSecurityPerimeterProfileAccessRuleProperties() - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("ooclutnp", "memczjkmmyk")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription().withId("sglhsr"), - new NetworkSecurityPerimeterSubscription().withId("yejylmbkzudnigrf"))) - .withNetworkSecurityPerimeters(Arrays.asList( - new NetworkSecurityPerimeterInfo().withId("jewlpxuzzjg") - .withPerimeterGuid("efqyhqotoihiqaky") - .withLocation("wf"), - new NetworkSecurityPerimeterInfo().withId("kwpzdqtvh") - .withPerimeterGuid("podaq") - .withLocation("sipi"), - new NetworkSecurityPerimeterInfo().withId("gbebjf") - .withPerimeterGuid("bmoichd") - .withLocation("nfpubntnbatz"), - new NetworkSecurityPerimeterInfo().withId("qs") - .withPerimeterGuid("saaelca") - .withLocation("cjuhplrvkm"))) - .withFullyQualifiedDomainNames(Arrays.asList("mjvlgfgg")) - .withEmailAddresses(Arrays.asList("yylizrz", "jpsfxsfu")) - .withPhoneNumbers(Arrays.asList("vtmva")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterProfileAccessRuleProperties.class); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND, model.direction()); - Assertions.assertEquals("ooclutnp", model.addressPrefixes().get(0)); - Assertions.assertEquals("sglhsr", model.subscriptions().get(0).id()); - Assertions.assertEquals("jewlpxuzzjg", model.networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("efqyhqotoihiqaky", model.networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("wf", model.networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("mjvlgfgg", model.fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("yylizrz", model.emailAddresses().get(0)); - Assertions.assertEquals("vtmva", model.phoneNumbers().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterProfileAccessRuleTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterProfileAccessRuleTests.java deleted file mode 100644 index b659a37a47ca..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterProfileAccessRuleTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRule; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRuleDirection; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterSubscription; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSecurityPerimeterProfileAccessRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterProfileAccessRule model = BinaryData.fromString( - "{\"fullyQualifiedArmId\":\"ucsofldpuviyf\",\"name\":\"abeolhbhlvbm\",\"type\":\"qi\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"udfbsfarf\",\"iowl\",\"jxnqp\",\"wgfstmhqykizm\"],\"subscriptions\":[{\"id\":\"oafcluqvox\"},{\"id\":\"cjimryvwgcwwpbmz\"},{\"id\":\"esyds\"}],\"networkSecurityPerimeters\":[{\"id\":\"ohec\",\"perimeterGuid\":\"opwndyqleallk\",\"location\":\"tkhlowkxxpvbr\"}],\"fullyQualifiedDomainNames\":[\"mzsyzfhotl\",\"ikcyyc\"],\"emailAddresses\":[\"sjlpjrtwszhv\",\"uic\",\"hvtrrmhwrbfdpyf\"],\"phoneNumbers\":[\"hvj\",\"lrocuyzlwh\"]}}") - .toObject(NetworkSecurityPerimeterProfileAccessRule.class); - Assertions.assertEquals("ucsofldpuviyf", model.fullyQualifiedArmId()); - Assertions.assertEquals("abeolhbhlvbm", model.name()); - Assertions.assertEquals("qi", model.type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND, model.direction()); - Assertions.assertEquals("udfbsfarf", model.addressPrefixes().get(0)); - Assertions.assertEquals("oafcluqvox", model.subscriptions().get(0).id()); - Assertions.assertEquals("ohec", model.networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("opwndyqleallk", model.networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("tkhlowkxxpvbr", model.networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("mzsyzfhotl", model.fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("sjlpjrtwszhv", model.emailAddresses().get(0)); - Assertions.assertEquals("hvj", model.phoneNumbers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterProfileAccessRule model - = new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("ucsofldpuviyf") - .withName("abeolhbhlvbm") - .withType("qi") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("udfbsfarf", "iowl", "jxnqp", "wgfstmhqykizm")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription().withId("oafcluqvox"), - new NetworkSecurityPerimeterSubscription().withId("cjimryvwgcwwpbmz"), - new NetworkSecurityPerimeterSubscription().withId("esyds"))) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo().withId("ohec") - .withPerimeterGuid("opwndyqleallk") - .withLocation("tkhlowkxxpvbr"))) - .withFullyQualifiedDomainNames(Arrays.asList("mzsyzfhotl", "ikcyyc")) - .withEmailAddresses(Arrays.asList("sjlpjrtwszhv", "uic", "hvtrrmhwrbfdpyf")) - .withPhoneNumbers(Arrays.asList("hvj", "lrocuyzlwh")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterProfileAccessRule.class); - Assertions.assertEquals("ucsofldpuviyf", model.fullyQualifiedArmId()); - Assertions.assertEquals("abeolhbhlvbm", model.name()); - Assertions.assertEquals("qi", model.type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND, model.direction()); - Assertions.assertEquals("udfbsfarf", model.addressPrefixes().get(0)); - Assertions.assertEquals("oafcluqvox", model.subscriptions().get(0).id()); - Assertions.assertEquals("ohec", model.networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("opwndyqleallk", model.networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("tkhlowkxxpvbr", model.networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("mzsyzfhotl", model.fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("sjlpjrtwszhv", model.emailAddresses().get(0)); - Assertions.assertEquals("hvj", model.phoneNumbers().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterSubscriptionTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterSubscriptionTests.java deleted file mode 100644 index 075481797ee3..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterSubscriptionTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterSubscription; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSecurityPerimeterSubscriptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterSubscription model - = BinaryData.fromString("{\"id\":\"w\"}").toObject(NetworkSecurityPerimeterSubscription.class); - Assertions.assertEquals("w", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterSubscription model = new NetworkSecurityPerimeterSubscription().withId("w"); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterSubscription.class); - Assertions.assertEquals("w", model.id()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationInfoTests.java deleted file mode 100644 index 5b3fc12614a4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationInfoTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.OperationInfo; -import org.junit.jupiter.api.Assertions; - -public final class OperationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInfo model = BinaryData - .fromString( - "{\"provider\":\"gy\",\"resource\":\"qfby\",\"operation\":\"rfgi\",\"description\":\"tcojocqwo\"}") - .toObject(OperationInfo.class); - Assertions.assertEquals("gy", model.provider()); - Assertions.assertEquals("qfby", model.resource()); - Assertions.assertEquals("rfgi", model.operation()); - Assertions.assertEquals("tcojocqwo", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInfo model = new OperationInfo().withProvider("gy") - .withResource("qfby") - .withOperation("rfgi") - .withDescription("tcojocqwo"); - model = BinaryData.fromObject(model).toObject(OperationInfo.class); - Assertions.assertEquals("gy", model.provider()); - Assertions.assertEquals("qfby", model.resource()); - Assertions.assertEquals("rfgi", model.operation()); - Assertions.assertEquals("tcojocqwo", model.description()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationInnerTests.java deleted file mode 100644 index ba08c4793fd7..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationInnerTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.OperationInner; -import com.azure.resourcemanager.eventgrid.models.OperationInfo; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"w\",\"display\":{\"provider\":\"wplefaxvxil\",\"resource\":\"tg\",\"operation\":\"nzeyqxtjj\",\"description\":\"qlqhycavodg\"},\"origin\":\"dbeesmie\",\"isDataAction\":true,\"properties\":\"dataariaawi\"}") - .toObject(OperationInner.class); - Assertions.assertEquals("w", model.name()); - Assertions.assertEquals("wplefaxvxil", model.display().provider()); - Assertions.assertEquals("tg", model.display().resource()); - Assertions.assertEquals("nzeyqxtjj", model.display().operation()); - Assertions.assertEquals("qlqhycavodg", model.display().description()); - Assertions.assertEquals("dbeesmie", model.origin()); - Assertions.assertEquals(true, model.isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withName("w") - .withDisplay(new OperationInfo().withProvider("wplefaxvxil") - .withResource("tg") - .withOperation("nzeyqxtjj") - .withDescription("qlqhycavodg")) - .withOrigin("dbeesmie") - .withIsDataAction(true) - .withProperties("dataariaawi"); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("w", model.name()); - Assertions.assertEquals("wplefaxvxil", model.display().provider()); - Assertions.assertEquals("tg", model.display().resource()); - Assertions.assertEquals("nzeyqxtjj", model.display().operation()); - Assertions.assertEquals("qlqhycavodg", model.display().description()); - Assertions.assertEquals("dbeesmie", model.origin()); - Assertions.assertEquals(true, model.isDataAction()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationsListMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationsListMockTests.java deleted file mode 100644 index 43d87876a7a0..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationsListMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"bhbafebzx\",\"display\":{\"provider\":\"qutibhl\",\"resource\":\"ntrvrkpsa\",\"operation\":\"u\",\"description\":\"zmlghny\"},\"origin\":\"lpyeu\",\"isDataAction\":false,\"properties\":\"datadixqbo\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bhbafebzx", response.iterator().next().name()); - Assertions.assertEquals("qutibhl", response.iterator().next().display().provider()); - Assertions.assertEquals("ntrvrkpsa", response.iterator().next().display().resource()); - Assertions.assertEquals("u", response.iterator().next().display().operation()); - Assertions.assertEquals("zmlghny", response.iterator().next().display().description()); - Assertions.assertEquals("lpyeu", response.iterator().next().origin()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationsListResultTests.java deleted file mode 100644 index fd9faeaf3033..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationsListResultTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.OperationInner; -import com.azure.resourcemanager.eventgrid.models.OperationInfo; -import com.azure.resourcemanager.eventgrid.models.OperationsListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationsListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"kqo\",\"display\":{\"provider\":\"kvgtrdcn\",\"resource\":\"mzzs\",\"operation\":\"m\",\"description\":\"nysuxmprafwgckh\"},\"origin\":\"xvd\",\"isDataAction\":true,\"properties\":\"dataafqr\"},{\"name\":\"daspavehhrvk\",\"display\":{\"provider\":\"zoz\",\"resource\":\"hcxgkmoyx\",\"operation\":\"yuibhm\",\"description\":\"nbzydvfvfcj\"},\"origin\":\"eoisrvhmgor\",\"isDataAction\":true,\"properties\":\"datais\"}]}") - .toObject(OperationsListResult.class); - Assertions.assertEquals("kqo", model.value().get(0).name()); - Assertions.assertEquals("kvgtrdcn", model.value().get(0).display().provider()); - Assertions.assertEquals("mzzs", model.value().get(0).display().resource()); - Assertions.assertEquals("m", model.value().get(0).display().operation()); - Assertions.assertEquals("nysuxmprafwgckh", model.value().get(0).display().description()); - Assertions.assertEquals("xvd", model.value().get(0).origin()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationsListResult model = new OperationsListResult().withValue(Arrays.asList( - new OperationInner().withName("kqo") - .withDisplay(new OperationInfo().withProvider("kvgtrdcn") - .withResource("mzzs") - .withOperation("m") - .withDescription("nysuxmprafwgckh")) - .withOrigin("xvd") - .withIsDataAction(true) - .withProperties("dataafqr"), - new OperationInner().withName("daspavehhrvk") - .withDisplay(new OperationInfo().withProvider("zoz") - .withResource("hcxgkmoyx") - .withOperation("yuibhm") - .withDescription("nbzydvfvfcj")) - .withOrigin("eoisrvhmgor") - .withIsDataAction(true) - .withProperties("datais"))); - model = BinaryData.fromObject(model).toObject(OperationsListResult.class); - Assertions.assertEquals("kqo", model.value().get(0).name()); - Assertions.assertEquals("kvgtrdcn", model.value().get(0).display().provider()); - Assertions.assertEquals("mzzs", model.value().get(0).display().resource()); - Assertions.assertEquals("m", model.value().get(0).display().operation()); - Assertions.assertEquals("nysuxmprafwgckh", model.value().get(0).display().description()); - Assertions.assertEquals("xvd", model.value().get(0).origin()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerClientAuthenticationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerClientAuthenticationTests.java deleted file mode 100644 index 2d4230fe3e37..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerClientAuthenticationTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.PartnerClientAuthentication; - -public final class PartnerClientAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerClientAuthentication model - = BinaryData.fromString("{\"clientAuthenticationType\":\"PartnerClientAuthentication\"}") - .toObject(PartnerClientAuthentication.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerClientAuthentication model = new PartnerClientAuthentication(); - model = BinaryData.fromObject(model).toObject(PartnerClientAuthentication.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationUpdateParameterPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationUpdateParameterPropertiesTests.java deleted file mode 100644 index 81d7bc80f001..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationUpdateParameterPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationUpdateParameterProperties; -import org.junit.jupiter.api.Assertions; - -public final class PartnerConfigurationUpdateParameterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerConfigurationUpdateParameterProperties model - = BinaryData.fromString("{\"defaultMaximumExpirationTimeInDays\":2084870746}") - .toObject(PartnerConfigurationUpdateParameterProperties.class); - Assertions.assertEquals(2084870746, model.defaultMaximumExpirationTimeInDays()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerConfigurationUpdateParameterProperties model - = new PartnerConfigurationUpdateParameterProperties().withDefaultMaximumExpirationTimeInDays(2084870746); - model = BinaryData.fromObject(model).toObject(PartnerConfigurationUpdateParameterProperties.class); - Assertions.assertEquals(2084870746, model.defaultMaximumExpirationTimeInDays()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationUpdateParametersTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationUpdateParametersTests.java deleted file mode 100644 index 274aeb604164..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationUpdateParametersTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.PartnerConfigurationUpdateParameters; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartnerConfigurationUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerConfigurationUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"tzbsrgnowcjhf\":\"khihihlhzds\",\"ctxmwoteyowcluq\":\"mvec\",\"wifzmp\":\"vekqvgqo\",\"cvhrfsp\":\"wyivqikf\"},\"properties\":{\"defaultMaximumExpirationTimeInDays\":1375476520}}") - .toObject(PartnerConfigurationUpdateParameters.class); - Assertions.assertEquals("khihihlhzds", model.tags().get("tzbsrgnowcjhf")); - Assertions.assertEquals(1375476520, model.defaultMaximumExpirationTimeInDays()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerConfigurationUpdateParameters model - = new PartnerConfigurationUpdateParameters() - .withTags(mapOf("tzbsrgnowcjhf", "khihihlhzds", "ctxmwoteyowcluq", "mvec", "wifzmp", "vekqvgqo", - "cvhrfsp", "wyivqikf")) - .withDefaultMaximumExpirationTimeInDays(1375476520); - model = BinaryData.fromObject(model).toObject(PartnerConfigurationUpdateParameters.class); - Assertions.assertEquals("khihihlhzds", model.tags().get("tzbsrgnowcjhf")); - Assertions.assertEquals(1375476520, model.defaultMaximumExpirationTimeInDays()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteMockTests.java deleted file mode 100644 index 6c466efe039d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerConfigurationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.partnerConfigurations().delete("irwcqzoofjnqjsv", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationInfoTests.java deleted file mode 100644 index f7cc2f3b9cd8..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationInfoTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; -import com.azure.resourcemanager.eventgrid.models.ResourceMoveChangeHistory; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PartnerDestinationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerDestinationInfo model = BinaryData.fromString( - "{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"ejk\",\"resourceGroupName\":\"ynqgoulzndlikwyq\",\"name\":\"fgibmadgakeq\",\"endpointServiceContext\":\"xybz\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"qytbciq\",\"resourceGroupName\":\"uflmm\",\"changedTimeUtc\":\"2021-12-07T12:50:46Z\"}]}") - .toObject(PartnerDestinationInfo.class); - Assertions.assertEquals("ejk", model.azureSubscriptionId()); - Assertions.assertEquals("ynqgoulzndlikwyq", model.resourceGroupName()); - Assertions.assertEquals("fgibmadgakeq", model.name()); - Assertions.assertEquals("xybz", model.endpointServiceContext()); - Assertions.assertEquals("qytbciq", model.resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("uflmm", model.resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-07T12:50:46Z"), - model.resourceMoveChangeHistory().get(0).changedTimeUtc()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerDestinationInfo model = new PartnerDestinationInfo().withAzureSubscriptionId("ejk") - .withResourceGroupName("ynqgoulzndlikwyq") - .withName("fgibmadgakeq") - .withEndpointServiceContext("xybz") - .withResourceMoveChangeHistory( - Arrays.asList(new ResourceMoveChangeHistory().withAzureSubscriptionId("qytbciq") - .withResourceGroupName("uflmm") - .withChangedTimeUtc(OffsetDateTime.parse("2021-12-07T12:50:46Z")))); - model = BinaryData.fromObject(model).toObject(PartnerDestinationInfo.class); - Assertions.assertEquals("ejk", model.azureSubscriptionId()); - Assertions.assertEquals("ynqgoulzndlikwyq", model.resourceGroupName()); - Assertions.assertEquals("fgibmadgakeq", model.name()); - Assertions.assertEquals("xybz", model.endpointServiceContext()); - Assertions.assertEquals("qytbciq", model.resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("uflmm", model.resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-07T12:50:46Z"), - model.resourceMoveChangeHistory().get(0).changedTimeUtc()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationInnerTests.java deleted file mode 100644 index 223b54920903..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationInnerTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class PartnerDestinationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerDestinationInner model = BinaryData.fromString( - "{\"properties\":{\"partnerRegistrationImmutableId\":\"23b1eb9b-a112-4ef8-9a1a-4d2c04f29020\",\"endpointServiceContext\":\"vyklxuby\",\"expirationTimeIfNotActivatedUtc\":\"2021-11-29T09:18:30Z\",\"provisioningState\":\"Canceled\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"lcqcuubgqibrt\",\"messageForActivation\":\"metttwgd\"},\"location\":\"qxihhrmooi\",\"tags\":{\"etoge\":\"eypxiutcxapzhyr\",\"rqnkkzjcjbtr\":\"joxslhvnhla\",\"eitpkxztmo\":\"aehvvibrxjjstoq\",\"qxzhem\":\"bklftidgfcwqmpim\"},\"id\":\"yhohujswtwkozzwc\",\"name\":\"lkb\",\"type\":\"wpfaj\"}") - .toObject(PartnerDestinationInner.class); - Assertions.assertEquals("qxihhrmooi", model.location()); - Assertions.assertEquals("eypxiutcxapzhyr", model.tags().get("etoge")); - Assertions.assertEquals(UUID.fromString("23b1eb9b-a112-4ef8-9a1a-4d2c04f29020"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("vyklxuby", model.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-29T09:18:30Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, model.activationState()); - Assertions.assertEquals("lcqcuubgqibrt", model.endpointBaseUrl()); - Assertions.assertEquals("metttwgd", model.messageForActivation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerDestinationInner model = new PartnerDestinationInner().withLocation("qxihhrmooi") - .withTags(mapOf("etoge", "eypxiutcxapzhyr", "rqnkkzjcjbtr", "joxslhvnhla", "eitpkxztmo", "aehvvibrxjjstoq", - "qxzhem", "bklftidgfcwqmpim")) - .withPartnerRegistrationImmutableId(UUID.fromString("23b1eb9b-a112-4ef8-9a1a-4d2c04f29020")) - .withEndpointServiceContext("vyklxuby") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-11-29T09:18:30Z")) - .withActivationState(PartnerDestinationActivationState.NEVER_ACTIVATED) - .withEndpointBaseUrl("lcqcuubgqibrt") - .withMessageForActivation("metttwgd"); - model = BinaryData.fromObject(model).toObject(PartnerDestinationInner.class); - Assertions.assertEquals("qxihhrmooi", model.location()); - Assertions.assertEquals("eypxiutcxapzhyr", model.tags().get("etoge")); - Assertions.assertEquals(UUID.fromString("23b1eb9b-a112-4ef8-9a1a-4d2c04f29020"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("vyklxuby", model.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-29T09:18:30Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, model.activationState()); - Assertions.assertEquals("lcqcuubgqibrt", model.endpointBaseUrl()); - Assertions.assertEquals("metttwgd", model.messageForActivation()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationPropertiesTests.java deleted file mode 100644 index 0841412691cd..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationPropertiesTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class PartnerDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerDestinationProperties model = BinaryData.fromString( - "{\"partnerRegistrationImmutableId\":\"bcf0817e-783b-40e9-bb89-dae9f36b6b6b\",\"endpointServiceContext\":\"ltlwtjjguktalhs\",\"expirationTimeIfNotActivatedUtc\":\"2021-06-19T06:58:15Z\",\"provisioningState\":\"Deleting\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"rpoaimlnwi\",\"messageForActivation\":\"omylwea\"}") - .toObject(PartnerDestinationProperties.class); - Assertions.assertEquals(UUID.fromString("bcf0817e-783b-40e9-bb89-dae9f36b6b6b"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("ltlwtjjguktalhs", model.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T06:58:15Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, model.activationState()); - Assertions.assertEquals("rpoaimlnwi", model.endpointBaseUrl()); - Assertions.assertEquals("omylwea", model.messageForActivation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerDestinationProperties model = new PartnerDestinationProperties() - .withPartnerRegistrationImmutableId(UUID.fromString("bcf0817e-783b-40e9-bb89-dae9f36b6b6b")) - .withEndpointServiceContext("ltlwtjjguktalhs") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-06-19T06:58:15Z")) - .withActivationState(PartnerDestinationActivationState.NEVER_ACTIVATED) - .withEndpointBaseUrl("rpoaimlnwi") - .withMessageForActivation("omylwea"); - model = BinaryData.fromObject(model).toObject(PartnerDestinationProperties.class); - Assertions.assertEquals(UUID.fromString("bcf0817e-783b-40e9-bb89-dae9f36b6b6b"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("ltlwtjjguktalhs", model.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T06:58:15Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, model.activationState()); - Assertions.assertEquals("rpoaimlnwi", model.endpointBaseUrl()); - Assertions.assertEquals("omylwea", model.messageForActivation()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationUpdateParametersTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationUpdateParametersTests.java deleted file mode 100644 index 02d2c83663f1..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationUpdateParametersTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationUpdateParameters; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartnerDestinationUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerDestinationUpdateParameters model = BinaryData - .fromString( - "{\"tags\":{\"hwwn\":\"cse\",\"ousnfepgfewe\":\"jhlfzswpchwahf\",\"hdjhlimmbcx\":\"wlyxgncxyk\"}}") - .toObject(PartnerDestinationUpdateParameters.class); - Assertions.assertEquals("cse", model.tags().get("hwwn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerDestinationUpdateParameters model = new PartnerDestinationUpdateParameters() - .withTags(mapOf("hwwn", "cse", "ousnfepgfewe", "jhlfzswpchwahf", "hdjhlimmbcx", "wlyxgncxyk")); - model = BinaryData.fromObject(model).toObject(PartnerDestinationUpdateParameters.class); - Assertions.assertEquals("cse", model.tags().get("hwwn")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsActivateWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsActivateWithResponseMockTests.java deleted file mode 100644 index c3bbcb058fc0..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsActivateWithResponseMockTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PartnerDestination; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerDestinationsActivateWithResponseMockTests { - @Test - public void testActivateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"53c0c7d1-b030-428a-a1d1-82030f7229c4\",\"endpointServiceContext\":\"ermhzicsbfdjhyaa\",\"expirationTimeIfNotActivatedUtc\":\"2021-12-08T00:07:25Z\",\"provisioningState\":\"Creating\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"iglh\",\"messageForActivation\":\"zwxqtejpii\"},\"location\":\"vtozya\",\"tags\":{\"klvqzrwtrdgscn\":\"nxkbylhyyxgf\",\"on\":\"q\",\"mezyo\":\"gnwxl\",\"fve\":\"xpthceopvkvt\"},\"id\":\"obpbokhmm\",\"name\":\"cdyarnggcjfwblqh\",\"type\":\"kasmcolmugpyva\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PartnerDestination response = manager.partnerDestinations() - .activateWithResponse("cybdueurgm", "dcpks", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vtozya", response.location()); - Assertions.assertEquals("nxkbylhyyxgf", response.tags().get("klvqzrwtrdgscn")); - Assertions.assertEquals(UUID.fromString("53c0c7d1-b030-428a-a1d1-82030f7229c4"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("ermhzicsbfdjhyaa", response.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T00:07:25Z"), - response.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.ACTIVATED, response.activationState()); - Assertions.assertEquals("iglh", response.endpointBaseUrl()); - Assertions.assertEquals("zwxqtejpii", response.messageForActivation()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsCreateOrUpdateMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsCreateOrUpdateMockTests.java deleted file mode 100644 index 3e520fdefc92..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PartnerDestination; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerDestinationsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"c3750bf6-e923-47ce-8663-4f4bf815b3d2\",\"endpointServiceContext\":\"glskakddi\",\"expirationTimeIfNotActivatedUtc\":\"2021-04-14T05:06:40Z\",\"provisioningState\":\"Succeeded\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"mtlpbyxro\",\"messageForActivation\":\"uyqyp\"},\"location\":\"mnoiicsudy\",\"tags\":{\"h\":\"jjtalxrdsj\",\"dp\":\"luqwgusxxhd\",\"bdmvsby\":\"wyblv\",\"kmkwjfbo\":\"daelqpv\"},\"id\":\"loggdusxursu\",\"name\":\"v\",\"type\":\"xcjkcoqwczsy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PartnerDestination response = manager.partnerDestinations() - .define("kluwz") - .withRegion("rdmvxyrxdhgv") - .withExistingResourceGroup("s") - .withTags(mapOf("gbzxmbtplefoioy", "bxaot", "gvdtmuuv", "doxzn", "erxrzutylcurza", "awsxmrszbknimxlp")) - .withPartnerRegistrationImmutableId(UUID.fromString("f698d12f-27dc-4285-aa96-73a985f9d33f")) - .withEndpointServiceContext("zvtyevjhubn") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-10-07T07:25:43Z")) - .withActivationState(PartnerDestinationActivationState.ACTIVATED) - .withEndpointBaseUrl("sqkpdmioyjpnm") - .withMessageForActivation("iqcpszpmcvq") - .create(); - - Assertions.assertEquals("mnoiicsudy", response.location()); - Assertions.assertEquals("jjtalxrdsj", response.tags().get("h")); - Assertions.assertEquals(UUID.fromString("c3750bf6-e923-47ce-8663-4f4bf815b3d2"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("glskakddi", response.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-14T05:06:40Z"), - response.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, response.activationState()); - Assertions.assertEquals("mtlpbyxro", response.endpointBaseUrl()); - Assertions.assertEquals("uyqyp", response.messageForActivation()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsDeleteMockTests.java deleted file mode 100644 index 9a1cf29d39b4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerDestinationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.partnerDestinations().delete("qnm", "tpuwnnohmmzngocf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsGetByResourceGroupWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 7e7383812e61..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PartnerDestination; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerDestinationsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"b051e1a5-4f98-4923-8542-687729421201\",\"endpointServiceContext\":\"tzbpyfao\",\"expirationTimeIfNotActivatedUtc\":\"2021-10-06T17:50:37Z\",\"provisioningState\":\"Succeeded\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"wmhjobzrfprizdcq\",\"messageForActivation\":\"f\"},\"location\":\"vb\",\"tags\":{\"oorssatfy\":\"whgkgsoa\",\"as\":\"ipufdmxuqbdq\",\"ixhg\":\"tuxvzfqayopbt\"},\"id\":\"bhxmndztgsqjayq\",\"name\":\"arxneibpgbr\",\"type\":\"bjdqkn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PartnerDestination response = manager.partnerDestinations() - .getByResourceGroupWithResponse("nii", "ncgagdvc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vb", response.location()); - Assertions.assertEquals("whgkgsoa", response.tags().get("oorssatfy")); - Assertions.assertEquals(UUID.fromString("b051e1a5-4f98-4923-8542-687729421201"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("tzbpyfao", response.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-06T17:50:37Z"), - response.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, response.activationState()); - Assertions.assertEquals("wmhjobzrfprizdcq", response.endpointBaseUrl()); - Assertions.assertEquals("f", response.messageForActivation()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListByResourceGroupMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListByResourceGroupMockTests.java deleted file mode 100644 index 808463910783..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListByResourceGroupMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PartnerDestination; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerDestinationsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"daeef811-e7b4-4e32-82df-a385461a3393\",\"endpointServiceContext\":\"c\",\"expirationTimeIfNotActivatedUtc\":\"2021-06-25T10:53:07Z\",\"provisioningState\":\"IdleDueToMirroredChannelResourceDeletion\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"vjxitzovnkrt\",\"messageForActivation\":\"lsmnihqlcoqksyi\"},\"location\":\"hyxwbgbud\",\"tags\":{\"rbccqcdht\":\"d\"},\"id\":\"ojvlirknucosaw\",\"name\":\"dtnagzlgpyaix\",\"type\":\"hzqjjtsmuydqfttk\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.partnerDestinations() - .listByResourceGroup("rtwletyves", "rtlhpdhwyn", 953677041, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hyxwbgbud", response.iterator().next().location()); - Assertions.assertEquals("d", response.iterator().next().tags().get("rbccqcdht")); - Assertions.assertEquals(UUID.fromString("daeef811-e7b4-4e32-82df-a385461a3393"), - response.iterator().next().partnerRegistrationImmutableId()); - Assertions.assertEquals("c", response.iterator().next().endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T10:53:07Z"), - response.iterator().next().expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, - response.iterator().next().activationState()); - Assertions.assertEquals("vjxitzovnkrt", response.iterator().next().endpointBaseUrl()); - Assertions.assertEquals("lsmnihqlcoqksyi", response.iterator().next().messageForActivation()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListMockTests.java deleted file mode 100644 index 96204c638ab9..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PartnerDestination; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerDestinationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"5d3e3f36-36c7-4299-acc4-68d10378d0ac\",\"endpointServiceContext\":\"xttpfs\",\"expirationTimeIfNotActivatedUtc\":\"2021-03-03T22:20:24Z\",\"provisioningState\":\"Canceled\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"cum\",\"messageForActivation\":\"dau\"},\"location\":\"llfeothx\",\"tags\":{\"uast\":\"igrjdljlkqhvkrbz\",\"pruulhg\":\"xk\",\"izwxvs\":\"t\"},\"id\":\"ksgfyyskyekg\",\"name\":\"fxcz\",\"type\":\"fcck\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.partnerDestinations().list("juypwyiulaynosu", 2064621352, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("llfeothx", response.iterator().next().location()); - Assertions.assertEquals("igrjdljlkqhvkrbz", response.iterator().next().tags().get("uast")); - Assertions.assertEquals(UUID.fromString("5d3e3f36-36c7-4299-acc4-68d10378d0ac"), - response.iterator().next().partnerRegistrationImmutableId()); - Assertions.assertEquals("xttpfs", response.iterator().next().endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T22:20:24Z"), - response.iterator().next().expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.ACTIVATED, - response.iterator().next().activationState()); - Assertions.assertEquals("cum", response.iterator().next().endpointBaseUrl()); - Assertions.assertEquals("dau", response.iterator().next().messageForActivation()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListResultTests.java deleted file mode 100644 index 6cd6572bc4b0..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListResultTests.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationsListResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class PartnerDestinationsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerDestinationsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"971904b8-7696-4b27-8218-bedb09d021c9\",\"endpointServiceContext\":\"rxvxcjzh\",\"expirationTimeIfNotActivatedUtc\":\"2021-05-06T06:52:32Z\",\"provisioningState\":\"Succeeded\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"gqscj\",\"messageForActivation\":\"ftjuh\"},\"location\":\"azkmtgguwp\",\"tags\":{\"vmmghfcfiwrxgk\":\"ajc\"},\"id\":\"euvyinzqodfvpgs\",\"name\":\"oxgsgbpfgzdjtx\",\"type\":\"zflbqvg\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"56ad678a-a3b8-4ebf-9e5c-76c066b1a2e9\",\"endpointServiceContext\":\"gafcqu\",\"expirationTimeIfNotActivatedUtc\":\"2021-03-05T03:27:21Z\",\"provisioningState\":\"Updating\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"sdtutnwlduyc\",\"messageForActivation\":\"zhyrmewipmve\"},\"location\":\"xukuqgsj\",\"tags\":{\"xgketwz\":\"n\",\"mhv\":\"hzjhf\",\"uneqsxvmhf\":\"muvgp\"},\"id\":\"uzjyihsasbhudypo\",\"name\":\"yue\",\"type\":\"slynsqyrpfoo\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"736d2a8a-8abc-47f5-a1f7-04f6704a6464\",\"endpointServiceContext\":\"tyms\",\"expirationTimeIfNotActivatedUtc\":\"2021-07-18T21:06:13Z\",\"provisioningState\":\"Succeeded\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"wqzdzgtilaxhnfhq\",\"messageForActivation\":\"vi\"},\"location\":\"uwivkxoy\",\"tags\":{\"kvcpwpgclr\":\"bixxrt\",\"yefrpmpdnqqska\":\"ivtsoxfrkenxpm\"},\"id\":\"ao\",\"name\":\"vmm\",\"type\":\"npqfrtqlkzmeg\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"9799ff59-19f8-4e32-b1e3-ce0815ca887c\",\"endpointServiceContext\":\"vkxlz\",\"expirationTimeIfNotActivatedUtc\":\"2021-04-18T23:17Z\",\"provisioningState\":\"IdleDueToMirroredChannelResourceDeletion\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"ealzxwhcansymoyq\",\"messageForActivation\":\"wigdi\"},\"location\":\"kbxgom\",\"tags\":{\"e\":\"uwasqvd\",\"uxakjsqzhzbezk\":\"y\",\"kgfmocwahpq\":\"imsidxasicddyvvj\",\"jhhn\":\"atjeaahh\"},\"id\":\"kzyb\",\"name\":\"jjidjk\",\"type\":\"yxkyxvx\"}],\"nextLink\":\"blbjedn\"}") - .toObject(PartnerDestinationsListResult.class); - Assertions.assertEquals("azkmtgguwp", model.value().get(0).location()); - Assertions.assertEquals("ajc", model.value().get(0).tags().get("vmmghfcfiwrxgk")); - Assertions.assertEquals(UUID.fromString("971904b8-7696-4b27-8218-bedb09d021c9"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("rxvxcjzh", model.value().get(0).endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T06:52:32Z"), - model.value().get(0).expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.ACTIVATED, model.value().get(0).activationState()); - Assertions.assertEquals("gqscj", model.value().get(0).endpointBaseUrl()); - Assertions.assertEquals("ftjuh", model.value().get(0).messageForActivation()); - Assertions.assertEquals("blbjedn", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerDestinationsListResult model = new PartnerDestinationsListResult().withValue(Arrays.asList( - new PartnerDestinationInner().withLocation("azkmtgguwp") - .withTags(mapOf("vmmghfcfiwrxgk", "ajc")) - .withPartnerRegistrationImmutableId(UUID.fromString("971904b8-7696-4b27-8218-bedb09d021c9")) - .withEndpointServiceContext("rxvxcjzh") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-05-06T06:52:32Z")) - .withActivationState(PartnerDestinationActivationState.ACTIVATED) - .withEndpointBaseUrl("gqscj") - .withMessageForActivation("ftjuh"), - new PartnerDestinationInner().withLocation("xukuqgsj") - .withTags(mapOf("xgketwz", "n", "mhv", "hzjhf", "uneqsxvmhf", "muvgp")) - .withPartnerRegistrationImmutableId(UUID.fromString("56ad678a-a3b8-4ebf-9e5c-76c066b1a2e9")) - .withEndpointServiceContext("gafcqu") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-03-05T03:27:21Z")) - .withActivationState(PartnerDestinationActivationState.ACTIVATED) - .withEndpointBaseUrl("sdtutnwlduyc") - .withMessageForActivation("zhyrmewipmve"), - new PartnerDestinationInner().withLocation("uwivkxoy") - .withTags(mapOf("kvcpwpgclr", "bixxrt", "yefrpmpdnqqska", "ivtsoxfrkenxpm")) - .withPartnerRegistrationImmutableId(UUID.fromString("736d2a8a-8abc-47f5-a1f7-04f6704a6464")) - .withEndpointServiceContext("tyms") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-07-18T21:06:13Z")) - .withActivationState(PartnerDestinationActivationState.ACTIVATED) - .withEndpointBaseUrl("wqzdzgtilaxhnfhq") - .withMessageForActivation("vi"), - new PartnerDestinationInner().withLocation("kbxgom") - .withTags( - mapOf("e", "uwasqvd", "uxakjsqzhzbezk", "y", "kgfmocwahpq", "imsidxasicddyvvj", "jhhn", "atjeaahh")) - .withPartnerRegistrationImmutableId(UUID.fromString("9799ff59-19f8-4e32-b1e3-ce0815ca887c")) - .withEndpointServiceContext("vkxlz") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-04-18T23:17Z")) - .withActivationState(PartnerDestinationActivationState.ACTIVATED) - .withEndpointBaseUrl("ealzxwhcansymoyq") - .withMessageForActivation("wigdi"))) - .withNextLink("blbjedn"); - model = BinaryData.fromObject(model).toObject(PartnerDestinationsListResult.class); - Assertions.assertEquals("azkmtgguwp", model.value().get(0).location()); - Assertions.assertEquals("ajc", model.value().get(0).tags().get("vmmghfcfiwrxgk")); - Assertions.assertEquals(UUID.fromString("971904b8-7696-4b27-8218-bedb09d021c9"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("rxvxcjzh", model.value().get(0).endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T06:52:32Z"), - model.value().get(0).expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.ACTIVATED, model.value().get(0).activationState()); - Assertions.assertEquals("gqscj", model.value().get(0).endpointBaseUrl()); - Assertions.assertEquals("ftjuh", model.value().get(0).messageForActivation()); - Assertions.assertEquals("blbjedn", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDetailsTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDetailsTests.java deleted file mode 100644 index 039849c120eb..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDetailsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.PartnerDetails; -import org.junit.jupiter.api.Assertions; - -public final class PartnerDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerDetails model - = BinaryData.fromString("{\"description\":\"rqpjiy\",\"longDescription\":\"jc\",\"setupUri\":\"a\"}") - .toObject(PartnerDetails.class); - Assertions.assertEquals("rqpjiy", model.description()); - Assertions.assertEquals("jc", model.longDescription()); - Assertions.assertEquals("a", model.setupUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerDetails model - = new PartnerDetails().withDescription("rqpjiy").withLongDescription("jc").withSetupUri("a"); - model = BinaryData.fromObject(model).toObject(PartnerDetails.class); - Assertions.assertEquals("rqpjiy", model.description()); - Assertions.assertEquals("jc", model.longDescription()); - Assertions.assertEquals("a", model.setupUri()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerEventSubscriptionDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerEventSubscriptionDestinationPropertiesTests.java deleted file mode 100644 index 2a1d11149656..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerEventSubscriptionDestinationPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerEventSubscriptionDestinationProperties; -import org.junit.jupiter.api.Assertions; - -public final class PartnerEventSubscriptionDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerEventSubscriptionDestinationProperties model = BinaryData.fromString("{\"resourceId\":\"ed\"}") - .toObject(PartnerEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("ed", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerEventSubscriptionDestinationProperties model - = new PartnerEventSubscriptionDestinationProperties().withResourceId("ed"); - model = BinaryData.fromObject(model).toObject(PartnerEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("ed", model.resourceId()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerEventSubscriptionDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerEventSubscriptionDestinationTests.java deleted file mode 100644 index b40c20e8fc0b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerEventSubscriptionDestinationTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.PartnerEventSubscriptionDestination; -import org.junit.jupiter.api.Assertions; - -public final class PartnerEventSubscriptionDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerEventSubscriptionDestination model = BinaryData - .fromString("{\"endpointType\":\"PartnerDestination\",\"properties\":{\"resourceId\":\"bfvxovqkxiuxq\"}}") - .toObject(PartnerEventSubscriptionDestination.class); - Assertions.assertEquals("bfvxovqkxiuxq", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerEventSubscriptionDestination model - = new PartnerEventSubscriptionDestination().withResourceId("bfvxovqkxiuxq"); - model = BinaryData.fromObject(model).toObject(PartnerEventSubscriptionDestination.class); - Assertions.assertEquals("bfvxovqkxiuxq", model.resourceId()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceInnerTests.java deleted file mode 100644 index a5946eeb43c6..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceInnerTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceInner; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartnerNamespaceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerNamespaceInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"aulx\"},\"groupIds\":[\"mjbnk\",\"pxynenlsvxeizzg\",\"klnsrmffey\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"piymerteea\",\"actionsRequired\":\"xqiekkkzddrtk\"},\"provisioningState\":\"Updating\"},\"id\":\"jbmxvavre\",\"name\":\"de\",\"type\":\"svecuijpxtxs\"}],\"provisioningState\":\"Canceled\",\"partnerRegistrationFullyQualifiedId\":\"tujwsawdd\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"bxv\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"zeexavoxtfgle\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"ypq\",\"tags\":{\"vodhtn\":\"fjacbslhhxudb\"},\"id\":\"irudh\",\"name\":\"m\",\"type\":\"es\"}") - .toObject(PartnerNamespaceInner.class); - Assertions.assertEquals("ypq", model.location()); - Assertions.assertEquals("fjacbslhhxudb", model.tags().get("vodhtn")); - Assertions.assertEquals("tujwsawdd", model.partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("zeexavoxtfgle", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER, model.partnerTopicRoutingMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerNamespaceInner model = new PartnerNamespaceInner().withLocation("ypq") - .withTags(mapOf("vodhtn", "fjacbslhhxudb")) - .withPartnerRegistrationFullyQualifiedId("tujwsawdd") - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("zeexavoxtfgle").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withPartnerTopicRoutingMode(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER); - model = BinaryData.fromObject(model).toObject(PartnerNamespaceInner.class); - Assertions.assertEquals("ypq", model.location()); - Assertions.assertEquals("fjacbslhhxudb", model.tags().get("vodhtn")); - Assertions.assertEquals("tujwsawdd", model.partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("zeexavoxtfgle", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER, model.partnerTopicRoutingMode()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacePropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacePropertiesTests.java deleted file mode 100644 index fee67084d4fa..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacePropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceProperties; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PartnerNamespacePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerNamespaceProperties model = BinaryData.fromString( - "{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"gzrcxfailcfxwmdb\"},\"groupIds\":[\"fgsftufqob\",\"jln\",\"cgcckknhxkizvyt\",\"rzvul\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"rano\",\"actionsRequired\":\"gukkjqnvbroy\"},\"provisioningState\":\"Canceled\"},\"id\":\"xulcdisdos\",\"name\":\"jbjsvgjrwh\",\"type\":\"yvycytdclxgcckn\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"btmvpdvjdhttza\"},\"groupIds\":[\"dxihc\",\"rphkmcrjdqnsdfz\",\"bg\",\"gkylkdghr\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"lwxezwzhokvbwnh\",\"actionsRequired\":\"qlgehg\"},\"provisioningState\":\"Succeeded\"},\"id\":\"pifhpfeoajvgcxtx\",\"name\":\"csheafidltugsr\",\"type\":\"smkss\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ftxfkf\"},\"groupIds\":[\"prhptillu\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"gdqoh\",\"actionsRequired\":\"wsldrizetpwbr\"},\"provisioningState\":\"Updating\"},\"id\":\"libph\",\"name\":\"qzmiza\",\"type\":\"a\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"jpdn\"},\"groupIds\":[\"ajoylhjl\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"primr\",\"actionsRequired\":\"pteecjme\"},\"provisioningState\":\"Canceled\"},\"id\":\"stvasylwxdzaumw\",\"name\":\"oohgu\",\"type\":\"fuzboyjathwtzolb\"}],\"provisioningState\":\"Creating\",\"partnerRegistrationFullyQualifiedId\":\"m\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"bwjscjpahlxveab\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"mqt\",\"action\":\"Allow\"},{\"ipMask\":\"ijddtvqc\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"}") - .toObject(PartnerNamespaceProperties.class); - Assertions.assertEquals("m", model.partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("mqt", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE, model.partnerTopicRoutingMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerNamespaceProperties model = new PartnerNamespaceProperties().withPartnerRegistrationFullyQualifiedId("m") - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("mqt").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("ijddtvqc").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withPartnerTopicRoutingMode(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE); - model = BinaryData.fromObject(model).toObject(PartnerNamespaceProperties.class); - Assertions.assertEquals("m", model.partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("mqt", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE, model.partnerTopicRoutingMode()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceUpdateParameterPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceUpdateParameterPropertiesTests.java deleted file mode 100644 index aa1ef4b48e75..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceUpdateParameterPropertiesTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceUpdateParameterProperties; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PartnerNamespaceUpdateParameterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerNamespaceUpdateParameterProperties model = BinaryData.fromString( - "{\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"hvseufuqyrx\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.1\",\"disableLocalAuth\":true}") - .toObject(PartnerNamespaceUpdateParameterProperties.class); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("hvseufuqyrx", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(true, model.disableLocalAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerNamespaceUpdateParameterProperties model - = new PartnerNamespaceUpdateParameterProperties().withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("hvseufuqyrx").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) - .withDisableLocalAuth(true); - model = BinaryData.fromObject(model).toObject(PartnerNamespaceUpdateParameterProperties.class); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("hvseufuqyrx", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(true, model.disableLocalAuth()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceUpdateParametersTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceUpdateParametersTests.java deleted file mode 100644 index e081de86ad7b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceUpdateParametersTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceUpdateParameters; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartnerNamespaceUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerNamespaceUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"ieekpndzaa\":\"kmr\"},\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"qwigpibudqwyxe\",\"action\":\"Allow\"},{\"ipMask\":\"pmzznrtffya\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.2\",\"disableLocalAuth\":true}}") - .toObject(PartnerNamespaceUpdateParameters.class); - Assertions.assertEquals("kmr", model.tags().get("ieekpndzaa")); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("qwigpibudqwyxe", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(true, model.disableLocalAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerNamespaceUpdateParameters model - = new PartnerNamespaceUpdateParameters().withTags(mapOf("ieekpndzaa", "kmr")) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("qwigpibudqwyxe").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("pmzznrtffya").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) - .withDisableLocalAuth(true); - model = BinaryData.fromObject(model).toObject(PartnerNamespaceUpdateParameters.class); - Assertions.assertEquals("kmr", model.tags().get("ieekpndzaa")); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("qwigpibudqwyxe", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(true, model.disableLocalAuth()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteMockTests.java deleted file mode 100644 index 5789814fee13..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerNamespacesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.partnerNamespaces().delete("rkmjqncfvdscnhe", "vwfnqqwypvn", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 56f84ec64383..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PartnerNamespace; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerNamespacesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"xxjfwtgdfkkauig\",\"muafmczfedyuepsv\",\"lti\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"vy\",\"name\":\"eocfkumcfjxok\",\"type\":\"elsy\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"k\",\"myg\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"rknfdrugjqyc\",\"name\":\"gtxk\",\"type\":\"dtu\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"dklotcsubmzo\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"obc\",\"name\":\"kxfpwh\",\"type\":\"yslb\"}],\"provisioningState\":\"Succeeded\",\"partnerRegistrationFullyQualifiedId\":\"mnnkkwayqshw\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"idttbsaqjmkgx\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"uylztpziizevjyk\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"hkqtwqlepjj\",\"tags\":{\"wz\":\"as\"},\"id\":\"ntogffjwajnrt\",\"name\":\"zvaqkifmxawost\",\"type\":\"zkn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PartnerNamespace response = manager.partnerNamespaces() - .getByResourceGroupWithResponse("qrizfwihvaan", "qtnhjrfd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hkqtwqlepjj", response.location()); - Assertions.assertEquals("as", response.tags().get("wz")); - Assertions.assertEquals("mnnkkwayqshw", response.partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, response.minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, response.publicNetworkAccess()); - Assertions.assertEquals("uylztpziizevjyk", response.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.inboundIpRules().get(0).action()); - Assertions.assertEquals(true, response.disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER, response.partnerTopicRoutingMode()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupMockTests.java deleted file mode 100644 index 901d4a8f3844..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PartnerNamespace; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerNamespacesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"zdprwnhkgqggox\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"ivrakfrryn\",\"name\":\"cwmhlymgnukxrk\",\"type\":\"mjpequlr\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"gjtfb\",\"lakkucddwnhcz\",\"utoucgjt\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"ayhic\",\"name\":\"qwwvgwkslvl\",\"type\":\"zedv\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"n\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"kzyqxadyfhbmw\",\"name\":\"hojqttbspvkhg\",\"type\":\"aqjsgyzstujr\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"sf\",\"rlduyehiiittugy\",\"qwrldaxur\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"csozjv\",\"name\":\"dzciggb\",\"type\":\"vt\"}],\"provisioningState\":\"Creating\",\"partnerRegistrationFullyQualifiedId\":\"alzyxwhoeamo\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"oeysfp\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"uh\",\"action\":\"Allow\"},{\"ipMask\":\"nkwmnfeub\",\"action\":\"Allow\"},{\"ipMask\":\"r\",\"action\":\"Allow\"},{\"ipMask\":\"giphrrkuumnqdu\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"},\"location\":\"eoq\",\"tags\":{\"oztjdqumqvfmw\":\"wlujopwnibit\",\"tgctxe\":\"ad\",\"fnzzryizwbxg\":\"tvgwyurbe\"},\"id\":\"ebxlayu\",\"name\":\"omirhp\",\"type\":\"abenqlamwmg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.partnerNamespaces() - .listByResourceGroup("rpbj", "mvgoqpleh", 932346868, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("eoq", response.iterator().next().location()); - Assertions.assertEquals("wlujopwnibit", response.iterator().next().tags().get("oztjdqumqvfmw")); - Assertions.assertEquals("alzyxwhoeamo", response.iterator().next().partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_ONE, response.iterator().next().minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, - response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("uh", response.iterator().next().inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); - Assertions.assertEquals(true, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE, - response.iterator().next().partnerTopicRoutingMode()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListMockTests.java deleted file mode 100644 index e6135d67ab44..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PartnerNamespace; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerNamespacesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"ssgwjfkain\",\"muymvec\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"cbgmusaictd\",\"name\":\"cnk\",\"type\":\"zohnrddclzeqozre\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"ixbnj\",\"qvzyuexozonyn\",\"ameudpabcreu\",\"zosgyjxvcvasorm\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"vdubew\",\"name\":\"zygba\",\"type\":\"uvecovsd\"}],\"provisioningState\":\"Updating\",\"partnerRegistrationFullyQualifiedId\":\"tdbakrlimzf\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"eqsifjmclngygnhr\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"tajdopggorwjoqtr\",\"action\":\"Allow\"},{\"ipMask\":\"clpofyrlmwkp\",\"action\":\"Allow\"},{\"ipMask\":\"xjgvh\",\"action\":\"Allow\"},{\"ipMask\":\"mkakmkook\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"},\"location\":\"uyakm\",\"tags\":{\"lzqjimejtgzjxx\":\"tfowzkroyrdurx\",\"ayyzivrmitc\":\"fejlzuqloiw\",\"fibfiplhx\":\"qlhchwhrktjle\",\"jow\":\"nsmy\"},\"id\":\"yeyzm\",\"name\":\"dsqcmhnxl\",\"type\":\"buwodmachbkv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.partnerNamespaces().list("r", 55620701, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uyakm", response.iterator().next().location()); - Assertions.assertEquals("tfowzkroyrdurx", response.iterator().next().tags().get("lzqjimejtgzjxx")); - Assertions.assertEquals("tdbakrlimzf", response.iterator().next().partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, response.iterator().next().minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, - response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("tajdopggorwjoqtr", response.iterator().next().inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); - Assertions.assertEquals(false, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE, - response.iterator().next().partnerTopicRoutingMode()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListResultTests.java deleted file mode 100644 index ed77e9001fdb..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListResultTests.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceInner; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PartnerNamespacesListResult; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartnerNamespacesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerNamespacesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"frddgamquhiosrsj\",\"name\":\"ivfcdisyirnx\",\"type\":\"hcz\"},{\"properties\":{},\"id\":\"rxzbujr\",\"name\":\"rhqvwrevkh\",\"type\":\"nlnzonzlrpi\"},{\"properties\":{},\"id\":\"wncvjtszcofiz\",\"name\":\"htd\",\"type\":\"gbjkvreljeamur\"}],\"provisioningState\":\"Updating\",\"partnerRegistrationFullyQualifiedId\":\"ov\",\"minimumTlsVersionAllowed\":\"1.2\",\"endpoint\":\"shcxlpmjerbdk\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"zozsdbccxjmonfdg\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"},\"location\":\"w\",\"tags\":{\"qjctzenkeif\":\"v\",\"xcudchxgsr\":\"zhmkdasvflyh\",\"lvizb\":\"oldforobw\",\"dxe\":\"hfovvacqpbtu\"},\"id\":\"zab\",\"name\":\"elawumu\",\"type\":\"slzkwrrwoycqu\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"hnomdrkywuh\",\"name\":\"svfuurutlwexxwl\",\"type\":\"lniexz\"},{\"properties\":{},\"id\":\"zpgepqty\",\"name\":\"bwwpgdakchzy\",\"type\":\"lixqnrkcxkjibn\"},{\"properties\":{},\"id\":\"ysux\",\"name\":\"wq\",\"type\":\"ntvlwijpsttexo\"},{\"properties\":{},\"id\":\"pwcyyufmhr\",\"name\":\"nc\",\"type\":\"wmqs\"}],\"provisioningState\":\"Canceled\",\"partnerRegistrationFullyQualifiedId\":\"qzhlctddunq\",\"minimumTlsVersionAllowed\":\"1.2\",\"endpoint\":\"pchrqbn\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"gydcw\",\"action\":\"Allow\"},{\"ipMask\":\"umvq\",\"action\":\"Allow\"},{\"ipMask\":\"hrraiouaubrj\",\"action\":\"Allow\"},{\"ipMask\":\"xfuojrn\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"},\"location\":\"sccbiuimzd\",\"tags\":{\"fdvruz\":\"dfqwmkyoq\",\"hpc\":\"lzo\",\"fdgugeyzi\":\"fnmdxotn\",\"jee\":\"grkyuizabsnmfpph\"},\"id\":\"yhyhsgzfczb\",\"name\":\"omfgbeglqgleohib\",\"type\":\"tnluankrr\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"btijvacvbm\",\"name\":\"z\",\"type\":\"qqxlajr\"},{\"properties\":{},\"id\":\"xaceve\",\"name\":\"jkuyxoafgaoq\",\"type\":\"tfaeyl\"},{\"properties\":{},\"id\":\"mfgvxirpghriypo\",\"name\":\"eyhlqhykprl\",\"type\":\"yznuciqd\"}],\"provisioningState\":\"Deleting\",\"partnerRegistrationFullyQualifiedId\":\"iitdfuxt\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"ibmi\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"tgnljhnmgixhcmav\",\"action\":\"Allow\"},{\"ipMask\":\"udorh\",\"action\":\"Allow\"},{\"ipMask\":\"prot\",\"action\":\"Allow\"},{\"ipMask\":\"ndm\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"k\",\"tags\":{\"tzfjltf\":\"gorbmftpm\",\"opv\":\"nzcyjtotp\"},\"id\":\"bdb\",\"name\":\"qgqqihedsvqwthmk\",\"type\":\"ibcysihsgqc\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"sdtmcdzs\",\"name\":\"fcohdxbzlmcmu\",\"type\":\"pcvhdbevwqqxeys\"},{\"properties\":{},\"id\":\"nqzi\",\"name\":\"kfkbgbzbowxeqocl\",\"type\":\"mygvkzqkj\"}],\"provisioningState\":\"Deleting\",\"partnerRegistrationFullyQualifiedId\":\"bzefezr\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"urtleipqxb\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"zvd\",\"action\":\"Allow\"},{\"ipMask\":\"ixz\",\"action\":\"Allow\"},{\"ipMask\":\"odawopqhewjptmcg\",\"action\":\"Allow\"},{\"ipMask\":\"t\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"utmzlbiojlvfhrbb\",\"tags\":{\"yurmochpprprs\":\"qvcww\",\"ayzejnhlbkpbz\":\"mo\",\"a\":\"cpilj\",\"chndbnwie\":\"zv\"},\"id\":\"olewjwi\",\"name\":\"ubwefqs\",\"type\":\"ap\"}],\"nextLink\":\"tf\"}") - .toObject(PartnerNamespacesListResult.class); - Assertions.assertEquals("w", model.value().get(0).location()); - Assertions.assertEquals("v", model.value().get(0).tags().get("qjctzenkeif")); - Assertions.assertEquals("ov", model.value().get(0).partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("zozsdbccxjmonfdg", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE, - model.value().get(0).partnerTopicRoutingMode()); - Assertions.assertEquals("tf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerNamespacesListResult model = new PartnerNamespacesListResult().withValue(Arrays.asList( - new PartnerNamespaceInner().withLocation("w") - .withTags(mapOf("qjctzenkeif", "v", "xcudchxgsr", "zhmkdasvflyh", "lvizb", "oldforobw", "dxe", - "hfovvacqpbtu")) - .withPartnerRegistrationFullyQualifiedId("ov") - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("zozsdbccxjmonfdg").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withPartnerTopicRoutingMode(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE), - new PartnerNamespaceInner().withLocation("sccbiuimzd") - .withTags( - mapOf("fdvruz", "dfqwmkyoq", "hpc", "lzo", "fdgugeyzi", "fnmdxotn", "jee", "grkyuizabsnmfpph")) - .withPartnerRegistrationFullyQualifiedId("qzhlctddunq") - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("gydcw").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("umvq").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("hrraiouaubrj").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("xfuojrn").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withPartnerTopicRoutingMode(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE), - new PartnerNamespaceInner().withLocation("k") - .withTags(mapOf("tzfjltf", "gorbmftpm", "opv", "nzcyjtotp")) - .withPartnerRegistrationFullyQualifiedId("iitdfuxt") - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("tgnljhnmgixhcmav").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("udorh").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("prot").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("ndm").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withPartnerTopicRoutingMode(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER), - new PartnerNamespaceInner().withLocation("utmzlbiojlvfhrbb") - .withTags(mapOf("yurmochpprprs", "qvcww", "ayzejnhlbkpbz", "mo", "a", "cpilj", "chndbnwie", "zv")) - .withPartnerRegistrationFullyQualifiedId("bzefezr") - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("zvd").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("ixz").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("odawopqhewjptmcg").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("t").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withPartnerTopicRoutingMode(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER))) - .withNextLink("tf"); - model = BinaryData.fromObject(model).toObject(PartnerNamespacesListResult.class); - Assertions.assertEquals("w", model.value().get(0).location()); - Assertions.assertEquals("v", model.value().get(0).tags().get("qjctzenkeif")); - Assertions.assertEquals("ov", model.value().get(0).partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("zozsdbccxjmonfdg", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE, - model.value().get(0).partnerTopicRoutingMode()); - Assertions.assertEquals("tf", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationInnerTests.java deleted file mode 100644 index 02e2dfd64307..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerRegistrationInner; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class PartnerRegistrationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerRegistrationInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"partnerRegistrationImmutableId\":\"7f5a87d9-74b1-42d8-a546-b5d305bfc544\"},\"location\":\"tqwpwya\",\"tags\":{\"oguyaip\":\"asqbucljgkyex\",\"waz\":\"dsdaultxijjumf\",\"jng\":\"nqnm\",\"bjwgnyfus\":\"qdqx\"},\"id\":\"zsvtuikzhajqgl\",\"name\":\"fh\",\"type\":\"l\"}") - .toObject(PartnerRegistrationInner.class); - Assertions.assertEquals("tqwpwya", model.location()); - Assertions.assertEquals("asqbucljgkyex", model.tags().get("oguyaip")); - Assertions.assertEquals(UUID.fromString("7f5a87d9-74b1-42d8-a546-b5d305bfc544"), - model.partnerRegistrationImmutableId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerRegistrationInner model = new PartnerRegistrationInner().withLocation("tqwpwya") - .withTags(mapOf("oguyaip", "asqbucljgkyex", "waz", "dsdaultxijjumf", "jng", "nqnm", "bjwgnyfus", "qdqx")) - .withPartnerRegistrationImmutableId(UUID.fromString("7f5a87d9-74b1-42d8-a546-b5d305bfc544")); - model = BinaryData.fromObject(model).toObject(PartnerRegistrationInner.class); - Assertions.assertEquals("tqwpwya", model.location()); - Assertions.assertEquals("asqbucljgkyex", model.tags().get("oguyaip")); - Assertions.assertEquals(UUID.fromString("7f5a87d9-74b1-42d8-a546-b5d305bfc544"), - model.partnerRegistrationImmutableId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationPropertiesTests.java deleted file mode 100644 index 393db6d1e03f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerRegistrationProperties; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class PartnerRegistrationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerRegistrationProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Deleting\",\"partnerRegistrationImmutableId\":\"554efdcd-247e-4a65-998d-c23b1caa96d2\"}") - .toObject(PartnerRegistrationProperties.class); - Assertions.assertEquals(UUID.fromString("554efdcd-247e-4a65-998d-c23b1caa96d2"), - model.partnerRegistrationImmutableId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerRegistrationProperties model = new PartnerRegistrationProperties() - .withPartnerRegistrationImmutableId(UUID.fromString("554efdcd-247e-4a65-998d-c23b1caa96d2")); - model = BinaryData.fromObject(model).toObject(PartnerRegistrationProperties.class); - Assertions.assertEquals(UUID.fromString("554efdcd-247e-4a65-998d-c23b1caa96d2"), - model.partnerRegistrationImmutableId()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationUpdateParametersTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationUpdateParametersTests.java deleted file mode 100644 index 3740f128c5ff..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationUpdateParametersTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.PartnerRegistrationUpdateParameters; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartnerRegistrationUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerRegistrationUpdateParameters model = BinaryData.fromString("{\"tags\":{\"sovwxznptgoeiyb\":\"nqnzrd\"}}") - .toObject(PartnerRegistrationUpdateParameters.class); - Assertions.assertEquals("nqnzrd", model.tags().get("sovwxznptgoeiyb")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerRegistrationUpdateParameters model - = new PartnerRegistrationUpdateParameters().withTags(mapOf("sovwxznptgoeiyb", "nqnzrd")); - model = BinaryData.fromObject(model).toObject(PartnerRegistrationUpdateParameters.class); - Assertions.assertEquals("nqnzrd", model.tags().get("sovwxznptgoeiyb")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateMockTests.java deleted file mode 100644 index af1d2b7965c7..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PartnerRegistration; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerRegistrationsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerRegistrationImmutableId\":\"487da261-ad88-4664-9348-6c29828b1c3c\"},\"location\":\"hggabqbgamklil\",\"tags\":{\"ffhsdpzouhk\":\"d\",\"dfddtullygtav\":\"qrxqwqnjx\",\"phraspifleim\":\"zcxdfweapyfmlxrl\",\"mdbgi\":\"x\"},\"id\":\"ehfgsm\",\"name\":\"rjuqbpxtokl\",\"type\":\"mtznpaxwfqtyyqi\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PartnerRegistration response = manager.partnerRegistrations() - .define("jk") - .withRegion("zobuzmsxgamtdtk") - .withExistingResourceGroup("loqd") - .withTags(mapOf("mrljdpoqfxye", "thuzdprm")) - .withPartnerRegistrationImmutableId(UUID.fromString("33204f09-c7e4-49cd-9c30-38bd60191425")) - .create(); - - Assertions.assertEquals("hggabqbgamklil", response.location()); - Assertions.assertEquals("d", response.tags().get("ffhsdpzouhk")); - Assertions.assertEquals(UUID.fromString("487da261-ad88-4664-9348-6c29828b1c3c"), - response.partnerRegistrationImmutableId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteMockTests.java deleted file mode 100644 index 282193cd2f84..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerRegistrationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.partnerRegistrations().delete("pxhn", "lslekcttgzkj", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 79aa2c2bf729..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PartnerRegistration; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerRegistrationsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerRegistrationImmutableId\":\"57ad2d28-c5a8-46cb-b868-7c977d9959ea\"},\"location\":\"uq\",\"tags\":{\"rkgzkyhudbkuw\":\"adhfztlray\",\"kfecjvxf\":\"zqxlcwe\"},\"id\":\"qufqizj\",\"name\":\"ppwooaj\",\"type\":\"yyjmjjxiz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PartnerRegistration response = manager.partnerRegistrations() - .getByResourceGroupWithResponse("dulpodkaxpfobk", "hmhjd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("uq", response.location()); - Assertions.assertEquals("adhfztlray", response.tags().get("rkgzkyhudbkuw")); - Assertions.assertEquals(UUID.fromString("57ad2d28-c5a8-46cb-b868-7c977d9959ea"), - response.partnerRegistrationImmutableId()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupMockTests.java deleted file mode 100644 index e6e49137607f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PartnerRegistration; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerRegistrationsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"partnerRegistrationImmutableId\":\"b226d774-f5a0-4aaa-86b1-aadc6a8502e0\"},\"location\":\"zpgf\",\"tags\":{\"kynrceqavf\":\"jdjxhzghgo\"},\"id\":\"bdfmm\",\"name\":\"jdnaju\",\"type\":\"pjyyqmkwlhvc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.partnerRegistrations() - .listByResourceGroup("kwepwo", "ggicwnxhtfmcqbs", 170506220, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zpgf", response.iterator().next().location()); - Assertions.assertEquals("jdjxhzghgo", response.iterator().next().tags().get("kynrceqavf")); - Assertions.assertEquals(UUID.fromString("b226d774-f5a0-4aaa-86b1-aadc6a8502e0"), - response.iterator().next().partnerRegistrationImmutableId()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListMockTests.java deleted file mode 100644 index 9aea6735e8ed..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PartnerRegistration; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerRegistrationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerRegistrationImmutableId\":\"2d61a9bb-b9aa-4154-9cf3-0959a79b27e5\"},\"location\":\"ahuq\",\"tags\":{\"wvmqxi\":\"zucwwmejjqhd\",\"bn\":\"ookyfoz\"},\"id\":\"x\",\"name\":\"ypfqpgaixw\",\"type\":\"grkkderfrswq\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.partnerRegistrations().list("yqpdwadeghztld", 1838673940, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ahuq", response.iterator().next().location()); - Assertions.assertEquals("zucwwmejjqhd", response.iterator().next().tags().get("wvmqxi")); - Assertions.assertEquals(UUID.fromString("2d61a9bb-b9aa-4154-9cf3-0959a79b27e5"), - response.iterator().next().partnerRegistrationImmutableId()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListResultTests.java deleted file mode 100644 index 0afac817fe89..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListResultTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerRegistrationInner; -import com.azure.resourcemanager.eventgrid.models.PartnerRegistrationsListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class PartnerRegistrationsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerRegistrationsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"partnerRegistrationImmutableId\":\"05fb6575-63b6-4a01-afe8-a8e781aa5872\"},\"location\":\"slkvntjl\",\"tags\":{\"oov\":\"jkskyr\",\"znmmaxrizkzobgo\":\"idsxwaabzmifry\",\"ieixynllxe\":\"xlhslnel\"},\"id\":\"wcrojphslhcaw\",\"name\":\"u\",\"type\":\"i\"}],\"nextLink\":\"wfmvigorqjbt\"}") - .toObject(PartnerRegistrationsListResult.class); - Assertions.assertEquals("slkvntjl", model.value().get(0).location()); - Assertions.assertEquals("jkskyr", model.value().get(0).tags().get("oov")); - Assertions.assertEquals(UUID.fromString("05fb6575-63b6-4a01-afe8-a8e781aa5872"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("wfmvigorqjbt", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerRegistrationsListResult model = new PartnerRegistrationsListResult() - .withValue(Arrays.asList(new PartnerRegistrationInner().withLocation("slkvntjl") - .withTags(mapOf("oov", "jkskyr", "znmmaxrizkzobgo", "idsxwaabzmifry", "ieixynllxe", "xlhslnel")) - .withPartnerRegistrationImmutableId(UUID.fromString("05fb6575-63b6-4a01-afe8-a8e781aa5872")))) - .withNextLink("wfmvigorqjbt"); - model = BinaryData.fromObject(model).toObject(PartnerRegistrationsListResult.class); - Assertions.assertEquals("slkvntjl", model.value().get(0).location()); - Assertions.assertEquals("jkskyr", model.value().get(0).tags().get("oov")); - Assertions.assertEquals(UUID.fromString("05fb6575-63b6-4a01-afe8-a8e781aa5872"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("wfmvigorqjbt", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteMockTests.java deleted file mode 100644 index c170f475b99e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerTopicEventSubscriptionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.partnerTopicEventSubscriptions() - .delete("yuqh", "lmcskyk", "fuofixcnpcfykkp", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java deleted file mode 100644 index a39fa078f49e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeListResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests { - @Test - public void testGetDeliveryAttributesWithResponse() throws Exception { - String responseStr = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ukz\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeliveryAttributeListResult response = manager.partnerTopicEventSubscriptions() - .getDeliveryAttributesWithResponse("fdz", "c", "uzfwo", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ukz", response.value().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java deleted file mode 100644 index 9cf65b6d81fc..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerTopicEventSubscriptionsGetFullUrlWithResponseMockTests { - @Test - public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"pcf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EventSubscriptionFullUrl response = manager.partnerTopicEventSubscriptions() - .getFullUrlWithResponse("ycpawm", "jp", "dpwrp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("pcf", response.endpointUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicInfoTests.java deleted file mode 100644 index ef95d7d886e0..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicInfoTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartnerTopicInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerTopicInfo model = BinaryData.fromString( - "{\"azureSubscriptionId\":\"qtrgqjbpfzfsinzg\",\"resourceGroupName\":\"cjrwzoxxjtfellu\",\"name\":\"zitonpeqfpjkjl\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"xzxtheo\":{\"description\":\"pfxxy\",\"displayName\":\"ninmayhuyb\",\"documentationUrl\":\"podepoo\",\"dataSchemaUrl\":\"nuvamiheogna\"},\"kufubljo\":{\"description\":\"si\",\"displayName\":\"evcciqihnhun\",\"documentationUrl\":\"wjzrnfygxgisp\",\"dataSchemaUrl\":\"vtz\"},\"clxxwrljdo\":{\"description\":\"qeof\",\"displayName\":\"e\",\"documentationUrl\":\"hqjbasvmsmj\",\"dataSchemaUrl\":\"lngsntnbybkzgcwr\"},\"qpjwnzlljfm\":{\"description\":\"kcqvkocrc\",\"displayName\":\"kwt\",\"documentationUrl\":\"xbnjbiksq\",\"dataSchemaUrl\":\"lssai\"}}},\"source\":\"eebvmgxsab\"}") - .toObject(PartnerTopicInfo.class); - Assertions.assertEquals("qtrgqjbpfzfsinzg", model.azureSubscriptionId()); - Assertions.assertEquals("cjrwzoxxjtfellu", model.resourceGroupName()); - Assertions.assertEquals("zitonpeqfpjkjl", model.name()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("pfxxy", model.eventTypeInfo().inlineEventTypes().get("xzxtheo").description()); - Assertions.assertEquals("ninmayhuyb", model.eventTypeInfo().inlineEventTypes().get("xzxtheo").displayName()); - Assertions.assertEquals("podepoo", model.eventTypeInfo().inlineEventTypes().get("xzxtheo").documentationUrl()); - Assertions.assertEquals("nuvamiheogna", - model.eventTypeInfo().inlineEventTypes().get("xzxtheo").dataSchemaUrl()); - Assertions.assertEquals("eebvmgxsab", model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerTopicInfo model = new PartnerTopicInfo().withAzureSubscriptionId("qtrgqjbpfzfsinzg") - .withResourceGroupName("cjrwzoxxjtfellu") - .withName("zitonpeqfpjkjl") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("xzxtheo", - new InlineEventProperties().withDescription("pfxxy") - .withDisplayName("ninmayhuyb") - .withDocumentationUrl("podepoo") - .withDataSchemaUrl("nuvamiheogna"), - "kufubljo", - new InlineEventProperties().withDescription("si") - .withDisplayName("evcciqihnhun") - .withDocumentationUrl("wjzrnfygxgisp") - .withDataSchemaUrl("vtz"), - "clxxwrljdo", - new InlineEventProperties().withDescription("qeof") - .withDisplayName("e") - .withDocumentationUrl("hqjbasvmsmj") - .withDataSchemaUrl("lngsntnbybkzgcwr"), - "qpjwnzlljfm", - new InlineEventProperties().withDescription("kcqvkocrc") - .withDisplayName("kwt") - .withDocumentationUrl("xbnjbiksq") - .withDataSchemaUrl("lssai")))) - .withSource("eebvmgxsab"); - model = BinaryData.fromObject(model).toObject(PartnerTopicInfo.class); - Assertions.assertEquals("qtrgqjbpfzfsinzg", model.azureSubscriptionId()); - Assertions.assertEquals("cjrwzoxxjtfellu", model.resourceGroupName()); - Assertions.assertEquals("zitonpeqfpjkjl", model.name()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("pfxxy", model.eventTypeInfo().inlineEventTypes().get("xzxtheo").description()); - Assertions.assertEquals("ninmayhuyb", model.eventTypeInfo().inlineEventTypes().get("xzxtheo").displayName()); - Assertions.assertEquals("podepoo", model.eventTypeInfo().inlineEventTypes().get("xzxtheo").documentationUrl()); - Assertions.assertEquals("nuvamiheogna", - model.eventTypeInfo().inlineEventTypes().get("xzxtheo").dataSchemaUrl()); - Assertions.assertEquals("eebvmgxsab", model.source()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicInnerTests.java deleted file mode 100644 index c6e2b5f95cbb..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicInnerTests.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerTopicInner; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class PartnerTopicInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerTopicInner model = BinaryData.fromString( - "{\"properties\":{\"partnerRegistrationImmutableId\":\"124c4595-80f5-41d3-8318-3471070116d9\",\"source\":\"aglkafhon\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"zxrvxcus\":{\"description\":\"kpzvcpopmxelnwc\",\"displayName\":\"yjede\",\"documentationUrl\":\"mlfmkqs\",\"dataSchemaUrl\":\"zuawxtzxpuamwa\"},\"ljhlnymzotq\":{\"description\":\"phai\",\"displayName\":\"xyasflvgsgzw\",\"documentationUrl\":\"akoi\",\"dataSchemaUrl\":\"nsmjbl\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-08-01T01:33:07Z\",\"provisioningState\":\"Canceled\",\"activationState\":\"Activated\",\"partnerTopicFriendlyDescription\":\"qqvxmvwfgtayxons\",\"messageForActivation\":\"e\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"hcvsqltnzoi\",\"tenantId\":\"sxgnx\",\"userAssignedIdentities\":{\"h\":{\"principalId\":\"nmpqoxwdofdb\",\"clientId\":\"qxeiiqbimhtmwwi\"},\"embnkbw\":{\"principalId\":\"f\",\"clientId\":\"ofvwbcb\"},\"izvcjfe\":{\"principalId\":\"vxkdivqihebwtswb\",\"clientId\":\"wfmdurage\"}}},\"location\":\"isdju\",\"tags\":{\"bsazgakg\":\"bqigkx\"},\"id\":\"cyrcmjdmspo\",\"name\":\"apvu\",\"type\":\"rylniofrzg\"}") - .toObject(PartnerTopicInner.class); - Assertions.assertEquals("isdju", model.location()); - Assertions.assertEquals("bqigkx", model.tags().get("bsazgakg")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("hcvsqltnzoi", model.identity().principalId()); - Assertions.assertEquals("sxgnx", model.identity().tenantId()); - Assertions.assertEquals("nmpqoxwdofdb", model.identity().userAssignedIdentities().get("h").principalId()); - Assertions.assertEquals("qxeiiqbimhtmwwi", model.identity().userAssignedIdentities().get("h").clientId()); - Assertions.assertEquals(UUID.fromString("124c4595-80f5-41d3-8318-3471070116d9"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("aglkafhon", model.source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("kpzvcpopmxelnwc", - model.eventTypeInfo().inlineEventTypes().get("zxrvxcus").description()); - Assertions.assertEquals("yjede", model.eventTypeInfo().inlineEventTypes().get("zxrvxcus").displayName()); - Assertions.assertEquals("mlfmkqs", model.eventTypeInfo().inlineEventTypes().get("zxrvxcus").documentationUrl()); - Assertions.assertEquals("zuawxtzxpuamwa", - model.eventTypeInfo().inlineEventTypes().get("zxrvxcus").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T01:33:07Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.ACTIVATED, model.activationState()); - Assertions.assertEquals("qqvxmvwfgtayxons", model.partnerTopicFriendlyDescription()); - Assertions.assertEquals("e", model.messageForActivation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerTopicInner model = new PartnerTopicInner().withLocation("isdju") - .withTags(mapOf("bsazgakg", "bqigkx")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("hcvsqltnzoi") - .withTenantId("sxgnx") - .withUserAssignedIdentities(mapOf("h", - new UserIdentityProperties().withPrincipalId("nmpqoxwdofdb").withClientId("qxeiiqbimhtmwwi"), - "embnkbw", new UserIdentityProperties().withPrincipalId("f").withClientId("ofvwbcb"), "izvcjfe", - new UserIdentityProperties().withPrincipalId("vxkdivqihebwtswb").withClientId("wfmdurage")))) - .withPartnerRegistrationImmutableId(UUID.fromString("124c4595-80f5-41d3-8318-3471070116d9")) - .withSource("aglkafhon") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("zxrvxcus", - new InlineEventProperties().withDescription("kpzvcpopmxelnwc") - .withDisplayName("yjede") - .withDocumentationUrl("mlfmkqs") - .withDataSchemaUrl("zuawxtzxpuamwa"), - "ljhlnymzotq", - new InlineEventProperties().withDescription("phai") - .withDisplayName("xyasflvgsgzw") - .withDocumentationUrl("akoi") - .withDataSchemaUrl("nsmjbl")))) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-08-01T01:33:07Z")) - .withActivationState(PartnerTopicActivationState.ACTIVATED) - .withPartnerTopicFriendlyDescription("qqvxmvwfgtayxons") - .withMessageForActivation("e"); - model = BinaryData.fromObject(model).toObject(PartnerTopicInner.class); - Assertions.assertEquals("isdju", model.location()); - Assertions.assertEquals("bqigkx", model.tags().get("bsazgakg")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("hcvsqltnzoi", model.identity().principalId()); - Assertions.assertEquals("sxgnx", model.identity().tenantId()); - Assertions.assertEquals("nmpqoxwdofdb", model.identity().userAssignedIdentities().get("h").principalId()); - Assertions.assertEquals("qxeiiqbimhtmwwi", model.identity().userAssignedIdentities().get("h").clientId()); - Assertions.assertEquals(UUID.fromString("124c4595-80f5-41d3-8318-3471070116d9"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("aglkafhon", model.source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("kpzvcpopmxelnwc", - model.eventTypeInfo().inlineEventTypes().get("zxrvxcus").description()); - Assertions.assertEquals("yjede", model.eventTypeInfo().inlineEventTypes().get("zxrvxcus").displayName()); - Assertions.assertEquals("mlfmkqs", model.eventTypeInfo().inlineEventTypes().get("zxrvxcus").documentationUrl()); - Assertions.assertEquals("zuawxtzxpuamwa", - model.eventTypeInfo().inlineEventTypes().get("zxrvxcus").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T01:33:07Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.ACTIVATED, model.activationState()); - Assertions.assertEquals("qqvxmvwfgtayxons", model.partnerTopicFriendlyDescription()); - Assertions.assertEquals("e", model.messageForActivation()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicPropertiesTests.java deleted file mode 100644 index 488690d96778..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicPropertiesTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerTopicProperties; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class PartnerTopicPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerTopicProperties model = BinaryData.fromString( - "{\"partnerRegistrationImmutableId\":\"5fb42706-96e5-4f73-81f8-92fa2760bc6e\",\"source\":\"edm\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"uqn\":{\"description\":\"xbcuiiznkt\",\"displayName\":\"ansnvp\",\"documentationUrl\":\"bmikost\",\"dataSchemaUrl\":\"bkiw\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-11-18T18:14:42Z\",\"provisioningState\":\"Failed\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"sgcrpfbcunezzce\",\"messageForActivation\":\"lfwyfwlwxjwetn\"}") - .toObject(PartnerTopicProperties.class); - Assertions.assertEquals(UUID.fromString("5fb42706-96e5-4f73-81f8-92fa2760bc6e"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("edm", model.source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("xbcuiiznkt", model.eventTypeInfo().inlineEventTypes().get("uqn").description()); - Assertions.assertEquals("ansnvp", model.eventTypeInfo().inlineEventTypes().get("uqn").displayName()); - Assertions.assertEquals("bmikost", model.eventTypeInfo().inlineEventTypes().get("uqn").documentationUrl()); - Assertions.assertEquals("bkiw", model.eventTypeInfo().inlineEventTypes().get("uqn").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T18:14:42Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, model.activationState()); - Assertions.assertEquals("sgcrpfbcunezzce", model.partnerTopicFriendlyDescription()); - Assertions.assertEquals("lfwyfwlwxjwetn", model.messageForActivation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerTopicProperties model = new PartnerTopicProperties() - .withPartnerRegistrationImmutableId(UUID.fromString("5fb42706-96e5-4f73-81f8-92fa2760bc6e")) - .withSource("edm") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("uqn", - new InlineEventProperties().withDescription("xbcuiiznkt") - .withDisplayName("ansnvp") - .withDocumentationUrl("bmikost") - .withDataSchemaUrl("bkiw")))) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-11-18T18:14:42Z")) - .withActivationState(PartnerTopicActivationState.NEVER_ACTIVATED) - .withPartnerTopicFriendlyDescription("sgcrpfbcunezzce") - .withMessageForActivation("lfwyfwlwxjwetn"); - model = BinaryData.fromObject(model).toObject(PartnerTopicProperties.class); - Assertions.assertEquals(UUID.fromString("5fb42706-96e5-4f73-81f8-92fa2760bc6e"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("edm", model.source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("xbcuiiznkt", model.eventTypeInfo().inlineEventTypes().get("uqn").description()); - Assertions.assertEquals("ansnvp", model.eventTypeInfo().inlineEventTypes().get("uqn").displayName()); - Assertions.assertEquals("bmikost", model.eventTypeInfo().inlineEventTypes().get("uqn").documentationUrl()); - Assertions.assertEquals("bkiw", model.eventTypeInfo().inlineEventTypes().get("uqn").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T18:14:42Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, model.activationState()); - Assertions.assertEquals("sgcrpfbcunezzce", model.partnerTopicFriendlyDescription()); - Assertions.assertEquals("lfwyfwlwxjwetn", model.messageForActivation()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicUpdateParametersTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicUpdateParametersTests.java deleted file mode 100644 index ab0b35a0a211..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicUpdateParametersTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicUpdateParameters; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartnerTopicUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerTopicUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"qwztcmwqkc\":\"hclafzvaylptrs\",\"kjexfdeqvhp\":\"cxwaxfewz\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"shk\",\"tenantId\":\"f\",\"userAssignedIdentities\":{\"nptfujgi\":{\"principalId\":\"zjrgyww\",\"clientId\":\"jx\"},\"gehkfkimrtixokff\":{\"principalId\":\"aaoepttaqut\",\"clientId\":\"wemxswvruunzz\"},\"xgvelfclduccbird\":{\"principalId\":\"inljqepqwhixmo\",\"clientId\":\"tshi\"},\"inwjizcilngh\":{\"principalId\":\"uwc\",\"clientId\":\"iegstm\"}}}}") - .toObject(PartnerTopicUpdateParameters.class); - Assertions.assertEquals("hclafzvaylptrs", model.tags().get("qwztcmwqkc")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("shk", model.identity().principalId()); - Assertions.assertEquals("f", model.identity().tenantId()); - Assertions.assertEquals("zjrgyww", model.identity().userAssignedIdentities().get("nptfujgi").principalId()); - Assertions.assertEquals("jx", model.identity().userAssignedIdentities().get("nptfujgi").clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerTopicUpdateParameters model = new PartnerTopicUpdateParameters() - .withTags(mapOf("qwztcmwqkc", "hclafzvaylptrs", "kjexfdeqvhp", "cxwaxfewz")) - .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("shk") - .withTenantId("f") - .withUserAssignedIdentities(mapOf("nptfujgi", - new UserIdentityProperties().withPrincipalId("zjrgyww").withClientId("jx"), "gehkfkimrtixokff", - new UserIdentityProperties().withPrincipalId("aaoepttaqut").withClientId("wemxswvruunzz"), - "xgvelfclduccbird", - new UserIdentityProperties().withPrincipalId("inljqepqwhixmo").withClientId("tshi"), "inwjizcilngh", - new UserIdentityProperties().withPrincipalId("uwc").withClientId("iegstm")))); - model = BinaryData.fromObject(model).toObject(PartnerTopicUpdateParameters.class); - Assertions.assertEquals("hclafzvaylptrs", model.tags().get("qwztcmwqkc")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("shk", model.identity().principalId()); - Assertions.assertEquals("f", model.identity().tenantId()); - Assertions.assertEquals("zjrgyww", model.identity().userAssignedIdentities().get("nptfujgi").principalId()); - Assertions.assertEquals("jx", model.identity().userAssignedIdentities().get("nptfujgi").clientId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateWithResponseMockTests.java deleted file mode 100644 index 8e96b8d12548..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.PartnerTopic; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerTopicsActivateWithResponseMockTests { - @Test - public void testActivateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"4dbeb995-792e-4cd0-85d9-727e42a1c19c\",\"source\":\"joxtdahne\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"e\":{\"description\":\"ztivfwjl\",\"displayName\":\"zekfsrmauklajv\",\"documentationUrl\":\"oczhapejovtk\",\"dataSchemaUrl\":\"nhwhhnoyrzaao\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-10-09T20:50:13Z\",\"provisioningState\":\"Updating\",\"activationState\":\"Activated\",\"partnerTopicFriendlyDescription\":\"eat\",\"messageForActivation\":\"xxcrxoxdjxld\"},\"identity\":{\"type\":\"None\",\"principalId\":\"nzkdolrndwdbvxvz\",\"tenantId\":\"edoyqxlunkft\",\"userAssignedIdentities\":{\"divznl\":{\"principalId\":\"qqxmyzklaoanpoh\",\"clientId\":\"mzrqraz\"},\"roigbsfsgsaenwld\":{\"principalId\":\"slkskhjqjpvbai\",\"clientId\":\"jtgzgtaiywbq\"},\"ryldsxeb\":{\"principalId\":\"hljqlxsp\",\"clientId\":\"jc\"},\"yckhefrbhseue\":{\"principalId\":\"sxrznmg\",\"clientId\":\"al\"}}},\"location\":\"bgpxebjlu\",\"tags\":{\"d\":\"ytujra\",\"gtnse\":\"pryj\",\"s\":\"ouxly\",\"lmpctwj\":\"vyljurkeposehqq\"},\"id\":\"dsdlzmk\",\"name\":\"erxxxoteehkhowgo\",\"type\":\"vvh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PartnerTopic response = manager.partnerTopics() - .activateWithResponse("vxcgdhyhgoqgs", "yqyxyjrcbqpbis", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("bgpxebjlu", response.location()); - Assertions.assertEquals("ytujra", response.tags().get("d")); - Assertions.assertEquals(IdentityType.NONE, response.identity().type()); - Assertions.assertEquals("nzkdolrndwdbvxvz", response.identity().principalId()); - Assertions.assertEquals("edoyqxlunkft", response.identity().tenantId()); - Assertions.assertEquals("qqxmyzklaoanpoh", - response.identity().userAssignedIdentities().get("divznl").principalId()); - Assertions.assertEquals("mzrqraz", response.identity().userAssignedIdentities().get("divznl").clientId()); - Assertions.assertEquals(UUID.fromString("4dbeb995-792e-4cd0-85d9-727e42a1c19c"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("joxtdahne", response.source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("ztivfwjl", response.eventTypeInfo().inlineEventTypes().get("e").description()); - Assertions.assertEquals("zekfsrmauklajv", response.eventTypeInfo().inlineEventTypes().get("e").displayName()); - Assertions.assertEquals("oczhapejovtk", - response.eventTypeInfo().inlineEventTypes().get("e").documentationUrl()); - Assertions.assertEquals("nhwhhnoyrzaao", response.eventTypeInfo().inlineEventTypes().get("e").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-09T20:50:13Z"), - response.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.ACTIVATED, response.activationState()); - Assertions.assertEquals("eat", response.partnerTopicFriendlyDescription()); - Assertions.assertEquals("xxcrxoxdjxld", response.messageForActivation()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 4f4b2018d90b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerTopic; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerTopicsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"7e4d1d7e-db55-41e1-bf3e-c42a150a8584\",\"source\":\"gzxlermkmerghski\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"f\":{\"description\":\"cbkfukd\",\"displayName\":\"qnv\",\"documentationUrl\":\"dydshk\",\"dataSchemaUrl\":\"fyaloowwzizzny\"},\"qpfzlpejtznxlue\":{\"description\":\"zstifgufyj\",\"displayName\":\"kqiyvnd\",\"documentationUrl\":\"kgwesy\",\"dataSchemaUrl\":\"qh\"},\"cumecsaaqg\":{\"description\":\"jqbbgsimwejlw\",\"displayName\":\"bpjzobdwbcpraswk\",\"documentationUrl\":\"ydtnaczkfwfatgaw\",\"dataSchemaUrl\":\"nskivdwgt\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-09-11T10:28:46Z\",\"provisioningState\":\"IdleDueToMirroredChannelResourceDeletion\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"sbskowkrbhz\",\"messageForActivation\":\"bkhtmqowiu\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"ucyhfaimq\",\"tenantId\":\"ruozkgyfp\",\"userAssignedIdentities\":{\"xvlzjxplhpevasyn\":{\"principalId\":\"gfmq\",\"clientId\":\"kk\"}}},\"location\":\"vzjyielb\",\"tags\":{\"nmpecqxgiqasifub\":\"vbqv\"},\"id\":\"snstl\",\"name\":\"wqpjnxjkhtupsvy\",\"type\":\"uweuiy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PartnerTopic response = manager.partnerTopics() - .define("osnqliwkmzojfe") - .withRegion("dhqnufbxweiib") - .withExistingResourceGroup("ofnqhlbs") - .withTags(mapOf("ybydhui", "jovf", "aorhjkehwvumo", "aouwudh", "ugejcvjkjyczcmt", "qircamqprlob")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("pg") - .withTenantId("qebmvrdjomlnwsb") - .withUserAssignedIdentities(mapOf("oinmphymcqidklt", - new UserIdentityProperties().withPrincipalId("sflxkqesd").withClientId("dsbgzan")))) - .withPartnerRegistrationImmutableId(UUID.fromString("a3f89bb7-7b6a-4d13-bdcc-53b5d97c6567")) - .withSource("htgmknazgbj") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("lna", - new InlineEventProperties().withDescription("sttcucrcmm") - .withDisplayName("xp") - .withDocumentationUrl("iwifhbk") - .withDataSchemaUrl("dttohq"), - "bun", - new InlineEventProperties().withDescription("tgs") - .withDisplayName("ikvllrhtpmgl") - .withDocumentationUrl("oi") - .withDataSchemaUrl("trawrqkza")))) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-04-11T13:49:27Z")) - .withActivationState(PartnerTopicActivationState.ACTIVATED) - .withPartnerTopicFriendlyDescription("wee") - .withMessageForActivation("nejzltkaszfjsxs") - .create(); - - Assertions.assertEquals("vzjyielb", response.location()); - Assertions.assertEquals("vbqv", response.tags().get("nmpecqxgiqasifub")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("ucyhfaimq", response.identity().principalId()); - Assertions.assertEquals("ruozkgyfp", response.identity().tenantId()); - Assertions.assertEquals("gfmq", - response.identity().userAssignedIdentities().get("xvlzjxplhpevasyn").principalId()); - Assertions.assertEquals("kk", response.identity().userAssignedIdentities().get("xvlzjxplhpevasyn").clientId()); - Assertions.assertEquals(UUID.fromString("7e4d1d7e-db55-41e1-bf3e-c42a150a8584"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("gzxlermkmerghski", response.source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("cbkfukd", response.eventTypeInfo().inlineEventTypes().get("f").description()); - Assertions.assertEquals("qnv", response.eventTypeInfo().inlineEventTypes().get("f").displayName()); - Assertions.assertEquals("dydshk", response.eventTypeInfo().inlineEventTypes().get("f").documentationUrl()); - Assertions.assertEquals("fyaloowwzizzny", response.eventTypeInfo().inlineEventTypes().get("f").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-11T10:28:46Z"), - response.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, response.activationState()); - Assertions.assertEquals("sbskowkrbhz", response.partnerTopicFriendlyDescription()); - Assertions.assertEquals("bkhtmqowiu", response.messageForActivation()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateWithResponseMockTests.java deleted file mode 100644 index dfa0f5708361..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateWithResponseMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.PartnerTopic; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerTopicsDeactivateWithResponseMockTests { - @Test - public void testDeactivateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"6c431fd2-cd3e-47ed-87ce-4de7b4a574b8\",\"source\":\"jexayglxrkgjnmzp\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"izwgsoriobijeiyd\":{\"description\":\"fiuofpieid\",\"displayName\":\"vssqywjopackyhy\",\"documentationUrl\":\"ikmfn\",\"dataSchemaUrl\":\"millxgjs\"},\"zfffhtjnwo\":{\"description\":\"uynhbokayrgwybr\",\"displayName\":\"pdweoft\",\"documentationUrl\":\"rwaigsioctqkmv\",\"dataSchemaUrl\":\"nx\"},\"db\":{\"description\":\"tfjxtvlx\",\"displayName\":\"qfcwr\",\"documentationUrl\":\"omxeezwyhjmb\",\"dataSchemaUrl\":\"qegm\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-03-19T21:15:08Z\",\"provisioningState\":\"Deleting\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"vd\",\"messageForActivation\":\"detsz\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"jekwuyckyvne\",\"tenantId\":\"muffiwjbctvbpzu\",\"userAssignedIdentities\":{\"h\":{\"principalId\":\"otdxpo\",\"clientId\":\"slhwuusieckty\"},\"d\":{\"principalId\":\"xidhhxomil\",\"clientId\":\"xj\"},\"ateptwujjzg\":{\"principalId\":\"xwjwilm\",\"clientId\":\"sl\"}}},\"location\":\"qgq\",\"tags\":{\"qqy\":\"rhgtvhv\"},\"id\":\"bkkteo\",\"name\":\"ejogmkor\",\"type\":\"vmvm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PartnerTopic response = manager.partnerTopics() - .deactivateWithResponse("owpcbapnpxraqawb", "pspfeylqlo", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qgq", response.location()); - Assertions.assertEquals("rhgtvhv", response.tags().get("qqy")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("jekwuyckyvne", response.identity().principalId()); - Assertions.assertEquals("muffiwjbctvbpzu", response.identity().tenantId()); - Assertions.assertEquals("otdxpo", response.identity().userAssignedIdentities().get("h").principalId()); - Assertions.assertEquals("slhwuusieckty", response.identity().userAssignedIdentities().get("h").clientId()); - Assertions.assertEquals(UUID.fromString("6c431fd2-cd3e-47ed-87ce-4de7b4a574b8"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("jexayglxrkgjnmzp", response.source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("fiuofpieid", - response.eventTypeInfo().inlineEventTypes().get("izwgsoriobijeiyd").description()); - Assertions.assertEquals("vssqywjopackyhy", - response.eventTypeInfo().inlineEventTypes().get("izwgsoriobijeiyd").displayName()); - Assertions.assertEquals("ikmfn", - response.eventTypeInfo().inlineEventTypes().get("izwgsoriobijeiyd").documentationUrl()); - Assertions.assertEquals("millxgjs", - response.eventTypeInfo().inlineEventTypes().get("izwgsoriobijeiyd").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-19T21:15:08Z"), - response.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, response.activationState()); - Assertions.assertEquals("vd", response.partnerTopicFriendlyDescription()); - Assertions.assertEquals("detsz", response.messageForActivation()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteMockTests.java deleted file mode 100644 index 513e300c9441..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerTopicsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.partnerTopics().delete("orimmo", "zwdehkkmvhz", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index f6c9344f950f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.PartnerTopic; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerTopicsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"d2b3e193-7334-4f99-baa2-736c7e7097fd\",\"source\":\"uck\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"eiqbcbgvsbts\":{\"description\":\"tiiqqcqikclsmaln\",\"displayName\":\"woykdnonaaxwm\",\"documentationUrl\":\"ru\",\"dataSchemaUrl\":\"qcwnynl\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-07-28T19:39:39Z\",\"provisioningState\":\"Succeeded\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"xuvj\",\"messageForActivation\":\"mnrqstjcmetwml\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"vvdhgjn\",\"tenantId\":\"yqipslzmvcdsvm\",\"userAssignedIdentities\":{\"ybfzdqekivycp\":{\"principalId\":\"ekdtfobvfiyb\",\"clientId\":\"ich\"},\"lpryf\":{\"principalId\":\"vdizulrqtbh\",\"clientId\":\"ezp\"},\"cgndjgdp\":{\"principalId\":\"mdutzfk\",\"clientId\":\"lnoud\"},\"htujcyohigimwdc\":{\"principalId\":\"ggqqyeqfcb\",\"clientId\":\"lpyuflqjf\"}}},\"location\":\"klkqnqvkixnmb\",\"tags\":{\"zayspzvriet\":\"cuyrzwim\",\"pvdvatlzmgs\":\"fphmdzxplg\"},\"id\":\"hnzrsbkkzovlzdm\",\"name\":\"fmfws\",\"type\":\"afofu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PartnerTopic response = manager.partnerTopics() - .getByResourceGroupWithResponse("rcltungbsoljckm", "i", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("klkqnqvkixnmb", response.location()); - Assertions.assertEquals("cuyrzwim", response.tags().get("zayspzvriet")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("vvdhgjn", response.identity().principalId()); - Assertions.assertEquals("yqipslzmvcdsvm", response.identity().tenantId()); - Assertions.assertEquals("ekdtfobvfiyb", - response.identity().userAssignedIdentities().get("ybfzdqekivycp").principalId()); - Assertions.assertEquals("ich", response.identity().userAssignedIdentities().get("ybfzdqekivycp").clientId()); - Assertions.assertEquals(UUID.fromString("d2b3e193-7334-4f99-baa2-736c7e7097fd"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("uck", response.source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("tiiqqcqikclsmaln", - response.eventTypeInfo().inlineEventTypes().get("eiqbcbgvsbts").description()); - Assertions.assertEquals("woykdnonaaxwm", - response.eventTypeInfo().inlineEventTypes().get("eiqbcbgvsbts").displayName()); - Assertions.assertEquals("ru", - response.eventTypeInfo().inlineEventTypes().get("eiqbcbgvsbts").documentationUrl()); - Assertions.assertEquals("qcwnynl", - response.eventTypeInfo().inlineEventTypes().get("eiqbcbgvsbts").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-28T19:39:39Z"), - response.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, response.activationState()); - Assertions.assertEquals("xuvj", response.partnerTopicFriendlyDescription()); - Assertions.assertEquals("mnrqstjcmetwml", response.messageForActivation()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupMockTests.java deleted file mode 100644 index a9db2277dcd6..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.PartnerTopic; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerTopicsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"d0257b0e-0de3-4939-a123-1d5e254e277e\",\"source\":\"vcshtkut\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"aj\":{\"description\":\"dirdammtzjgc\",\"displayName\":\"fxtbwjjirmuydg\",\"documentationUrl\":\"tmdofgeoag\",\"dataSchemaUrl\":\"oftnxodwxm\"},\"vamyyznmrgcdo\":{\"description\":\"ygmgsevm\",\"displayName\":\"zenlrstgfcz\",\"documentationUrl\":\"d\",\"dataSchemaUrl\":\"idt\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-07-31T23:14:26Z\",\"provisioningState\":\"Failed\",\"activationState\":\"Activated\",\"partnerTopicFriendlyDescription\":\"oxuwhttnzqsaqm\",\"messageForActivation\":\"gszplus\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"z\",\"tenantId\":\"sgpgvokyejidbd\",\"userAssignedIdentities\":{\"wfkcauxuvavcpf\":{\"principalId\":\"unycwztlvvwsnm\",\"clientId\":\"kyjtrepw\"},\"lzwilfngojf\":{\"principalId\":\"ofuckc\",\"clientId\":\"txluevs\"},\"kktpmbmxbmbr\":{\"principalId\":\"ebuuxjx\",\"clientId\":\"xfjwp\"}}},\"location\":\"gzzxljbkhxsd\",\"tags\":{\"hweqjfyxydgtok\":\"umyd\"},\"id\":\"qbvwglgw\",\"name\":\"pvxakglhpsesrfga\",\"type\":\"qiy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.partnerTopics() - .listByResourceGroup("toakatprytgrhz", "qfdpf", 603344976, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gzzxljbkhxsd", response.iterator().next().location()); - Assertions.assertEquals("umyd", response.iterator().next().tags().get("hweqjfyxydgtok")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("z", response.iterator().next().identity().principalId()); - Assertions.assertEquals("sgpgvokyejidbd", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("unycwztlvvwsnm", - response.iterator().next().identity().userAssignedIdentities().get("wfkcauxuvavcpf").principalId()); - Assertions.assertEquals("kyjtrepw", - response.iterator().next().identity().userAssignedIdentities().get("wfkcauxuvavcpf").clientId()); - Assertions.assertEquals(UUID.fromString("d0257b0e-0de3-4939-a123-1d5e254e277e"), - response.iterator().next().partnerRegistrationImmutableId()); - Assertions.assertEquals("vcshtkut", response.iterator().next().source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.iterator().next().eventTypeInfo().kind()); - Assertions.assertEquals("dirdammtzjgc", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("aj").description()); - Assertions.assertEquals("fxtbwjjirmuydg", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("aj").displayName()); - Assertions.assertEquals("tmdofgeoag", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("aj").documentationUrl()); - Assertions.assertEquals("oftnxodwxm", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("aj").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T23:14:26Z"), - response.iterator().next().expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.ACTIVATED, response.iterator().next().activationState()); - Assertions.assertEquals("oxuwhttnzqsaqm", response.iterator().next().partnerTopicFriendlyDescription()); - Assertions.assertEquals("gszplus", response.iterator().next().messageForActivation()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListMockTests.java deleted file mode 100644 index b6cda5110b6d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.PartnerTopic; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PartnerTopicsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"78094bdf-3b8b-4d46-95c4-70736b166238\",\"source\":\"l\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"fmvsmcwoxfaxdt\":{\"description\":\"yaqandmymnqoqju\",\"displayName\":\"vsfbp\",\"documentationUrl\":\"zo\",\"dataSchemaUrl\":\"x\"},\"ini\":{\"description\":\"i\",\"displayName\":\"satroia\",\"documentationUrl\":\"sugmocpcjyc\",\"dataSchemaUrl\":\"elrgttwfldsiuo\"},\"upoyryefqm\":{\"description\":\"edpksriwmmtmqrxr\",\"displayName\":\"vvyczy\",\"documentationUrl\":\"ubt\",\"dataSchemaUrl\":\"bxiqahragpxmibpl\"},\"kkreh\":{\"description\":\"vyztxlno\",\"displayName\":\"pbjceegvy\",\"documentationUrl\":\"ztkutnj\",\"dataSchemaUrl\":\"l\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-04-28T17:50:29Z\",\"provisioningState\":\"IdleDueToMirroredChannelResourceDeletion\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"ifvulxf\",\"messageForActivation\":\"yrvjlgdezvjq\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"yaxqvjweiwtczkd\",\"tenantId\":\"vovbooqbmdqrx\",\"userAssignedIdentities\":{\"riefoo\":{\"principalId\":\"et\",\"clientId\":\"flwtjdt\"},\"ipsdudgcozzomehx\":{\"principalId\":\"cuxd\",\"clientId\":\"c\"},\"ckzdqiqdlra\":{\"principalId\":\"ntolamlb\",\"clientId\":\"uxkqllczipvwdt\"},\"lhpryjfzihuio\":{\"principalId\":\"kwx\",\"clientId\":\"uwxsuykznhrfgsl\"}}},\"location\":\"eo\",\"tags\":{\"dccxbeuuqu\":\"jtfeyvkbdgddkr\",\"xfn\":\"kzwtjwwguzytij\"},\"id\":\"ndegjdydhqkkkbj\",\"name\":\"ckcatuqbhpo\",\"type\":\"cnxtpzdlysei\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.partnerTopics().list("ovanyrva", 1587424466, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("eo", response.iterator().next().location()); - Assertions.assertEquals("jtfeyvkbdgddkr", response.iterator().next().tags().get("dccxbeuuqu")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("yaxqvjweiwtczkd", response.iterator().next().identity().principalId()); - Assertions.assertEquals("vovbooqbmdqrx", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("et", - response.iterator().next().identity().userAssignedIdentities().get("riefoo").principalId()); - Assertions.assertEquals("flwtjdt", - response.iterator().next().identity().userAssignedIdentities().get("riefoo").clientId()); - Assertions.assertEquals(UUID.fromString("78094bdf-3b8b-4d46-95c4-70736b166238"), - response.iterator().next().partnerRegistrationImmutableId()); - Assertions.assertEquals("l", response.iterator().next().source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.iterator().next().eventTypeInfo().kind()); - Assertions.assertEquals("yaqandmymnqoqju", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("fmvsmcwoxfaxdt").description()); - Assertions.assertEquals("vsfbp", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("fmvsmcwoxfaxdt").displayName()); - Assertions.assertEquals("zo", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("fmvsmcwoxfaxdt").documentationUrl()); - Assertions.assertEquals("x", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("fmvsmcwoxfaxdt").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T17:50:29Z"), - response.iterator().next().expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, - response.iterator().next().activationState()); - Assertions.assertEquals("ifvulxf", response.iterator().next().partnerTopicFriendlyDescription()); - Assertions.assertEquals("yrvjlgdezvjq", response.iterator().next().messageForActivation()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListResultTests.java deleted file mode 100644 index 4aa3ba37ab0b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListResultTests.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerTopicInner; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicsListResult; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class PartnerTopicsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerTopicsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"4f6f9778-ceca-4ec8-a621-8a860b63a76b\",\"source\":\"tbxqmuluxlxq\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"bycucrwnamikz\":{},\"brqbsmswzi\":{},\"gfuhokzrusw\":{},\"vhczznvfby\":{}}},\"expirationTimeIfNotActivatedUtc\":\"2021-12-08T17:30:41Z\",\"provisioningState\":\"Creating\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"xzv\",\"messageForActivation\":\"wmxqhndvnoamlds\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"jhhflzokxcoxpel\",\"tenantId\":\"eta\",\"userAssignedIdentities\":{\"npbs\":{\"principalId\":\"xo\",\"clientId\":\"ftgz\"},\"ozihmipgawt\":{\"principalId\":\"e\",\"clientId\":\"occsr\"},\"ztrksxwpndf\":{\"principalId\":\"pkyjcxcjxgrytfm\",\"clientId\":\"ycilrmcaykggnox\"}}},\"location\":\"pfnznthjtwkj\",\"tags\":{\"tcqiosmg\":\"rxuzvoam\",\"xqdlyrtltlapr\":\"zah\",\"atbhjmznn\":\"tz\"},\"id\":\"s\",\"name\":\"qeqala\",\"type\":\"vlagun\"}],\"nextLink\":\"gfebwlnb\"}") - .toObject(PartnerTopicsListResult.class); - Assertions.assertEquals("pfnznthjtwkj", model.value().get(0).location()); - Assertions.assertEquals("rxuzvoam", model.value().get(0).tags().get("tcqiosmg")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("jhhflzokxcoxpel", model.value().get(0).identity().principalId()); - Assertions.assertEquals("eta", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("xo", - model.value().get(0).identity().userAssignedIdentities().get("npbs").principalId()); - Assertions.assertEquals("ftgz", - model.value().get(0).identity().userAssignedIdentities().get("npbs").clientId()); - Assertions.assertEquals(UUID.fromString("4f6f9778-ceca-4ec8-a621-8a860b63a76b"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("tbxqmuluxlxq", model.value().get(0).source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.value().get(0).eventTypeInfo().kind()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T17:30:41Z"), - model.value().get(0).expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, model.value().get(0).activationState()); - Assertions.assertEquals("xzv", model.value().get(0).partnerTopicFriendlyDescription()); - Assertions.assertEquals("wmxqhndvnoamlds", model.value().get(0).messageForActivation()); - Assertions.assertEquals("gfebwlnb", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerTopicsListResult model = new PartnerTopicsListResult().withValue(Arrays.asList(new PartnerTopicInner() - .withLocation("pfnznthjtwkj") - .withTags(mapOf("tcqiosmg", "rxuzvoam", "xqdlyrtltlapr", "zah", "atbhjmznn", "tz")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("jhhflzokxcoxpel") - .withTenantId("eta") - .withUserAssignedIdentities(mapOf("npbs", - new UserIdentityProperties().withPrincipalId("xo").withClientId("ftgz"), "ozihmipgawt", - new UserIdentityProperties().withPrincipalId("e").withClientId("occsr"), "ztrksxwpndf", - new UserIdentityProperties().withPrincipalId("pkyjcxcjxgrytfm").withClientId("ycilrmcaykggnox")))) - .withPartnerRegistrationImmutableId(UUID.fromString("4f6f9778-ceca-4ec8-a621-8a860b63a76b")) - .withSource("tbxqmuluxlxq") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes( - mapOf("bycucrwnamikz", new InlineEventProperties(), "brqbsmswzi", new InlineEventProperties(), - "gfuhokzrusw", new InlineEventProperties(), "vhczznvfby", new InlineEventProperties()))) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-12-08T17:30:41Z")) - .withActivationState(PartnerTopicActivationState.NEVER_ACTIVATED) - .withPartnerTopicFriendlyDescription("xzv") - .withMessageForActivation("wmxqhndvnoamlds"))).withNextLink("gfebwlnb"); - model = BinaryData.fromObject(model).toObject(PartnerTopicsListResult.class); - Assertions.assertEquals("pfnznthjtwkj", model.value().get(0).location()); - Assertions.assertEquals("rxuzvoam", model.value().get(0).tags().get("tcqiosmg")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("jhhflzokxcoxpel", model.value().get(0).identity().principalId()); - Assertions.assertEquals("eta", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("xo", - model.value().get(0).identity().userAssignedIdentities().get("npbs").principalId()); - Assertions.assertEquals("ftgz", - model.value().get(0).identity().userAssignedIdentities().get("npbs").clientId()); - Assertions.assertEquals(UUID.fromString("4f6f9778-ceca-4ec8-a621-8a860b63a76b"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("tbxqmuluxlxq", model.value().get(0).source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.value().get(0).eventTypeInfo().kind()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T17:30:41Z"), - model.value().get(0).expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, model.value().get(0).activationState()); - Assertions.assertEquals("xzv", model.value().get(0).partnerTopicFriendlyDescription()); - Assertions.assertEquals("wmxqhndvnoamlds", model.value().get(0).messageForActivation()); - Assertions.assertEquals("gfebwlnb", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerUpdateDestinationInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerUpdateDestinationInfoTests.java deleted file mode 100644 index 3a4c4ba90207..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerUpdateDestinationInfoTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.PartnerUpdateDestinationInfo; - -public final class PartnerUpdateDestinationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerUpdateDestinationInfo model - = BinaryData.fromString("{\"endpointType\":\"PartnerUpdateDestinationInfo\"}") - .toObject(PartnerUpdateDestinationInfo.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerUpdateDestinationInfo model = new PartnerUpdateDestinationInfo(); - model = BinaryData.fromObject(model).toObject(PartnerUpdateDestinationInfo.class); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerUpdateTopicInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerUpdateTopicInfoTests.java deleted file mode 100644 index 5abc60557096..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerUpdateTopicInfoTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerUpdateTopicInfo; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartnerUpdateTopicInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartnerUpdateTopicInfo model = BinaryData.fromString( - "{\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"cyshurzafbljjgp\":{\"description\":\"i\",\"displayName\":\"xsqwpgrjbznorc\",\"documentationUrl\":\"vsnb\",\"dataSchemaUrl\":\"qabnmoc\"}}}}") - .toObject(PartnerUpdateTopicInfo.class); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("i", model.eventTypeInfo().inlineEventTypes().get("cyshurzafbljjgp").description()); - Assertions.assertEquals("xsqwpgrjbznorc", - model.eventTypeInfo().inlineEventTypes().get("cyshurzafbljjgp").displayName()); - Assertions.assertEquals("vsnb", - model.eventTypeInfo().inlineEventTypes().get("cyshurzafbljjgp").documentationUrl()); - Assertions.assertEquals("qabnmoc", - model.eventTypeInfo().inlineEventTypes().get("cyshurzafbljjgp").dataSchemaUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerUpdateTopicInfo model - = new PartnerUpdateTopicInfo().withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("cyshurzafbljjgp", - new InlineEventProperties().withDescription("i") - .withDisplayName("xsqwpgrjbznorc") - .withDocumentationUrl("vsnb") - .withDataSchemaUrl("qabnmoc")))); - model = BinaryData.fromObject(model).toObject(PartnerUpdateTopicInfo.class); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("i", model.eventTypeInfo().inlineEventTypes().get("cyshurzafbljjgp").description()); - Assertions.assertEquals("xsqwpgrjbznorc", - model.eventTypeInfo().inlineEventTypes().get("cyshurzafbljjgp").displayName()); - Assertions.assertEquals("vsnb", - model.eventTypeInfo().inlineEventTypes().get("cyshurzafbljjgp").documentationUrl()); - Assertions.assertEquals("qabnmoc", - model.eventTypeInfo().inlineEventTypes().get("cyshurzafbljjgp").dataSchemaUrl()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingInnerTests.java deleted file mode 100644 index a1dba691ab38..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner; -import com.azure.resourcemanager.eventgrid.models.PermissionType; -import org.junit.jupiter.api.Assertions; - -public final class PermissionBindingInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PermissionBindingInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"ulajvlejchc\",\"topicSpaceName\":\"lzk\",\"permission\":\"Subscriber\",\"clientGroupName\":\"anrupdwvnphcn\",\"provisioningState\":\"Canceled\"},\"id\":\"jhmqrhvthla\",\"name\":\"wdcxsmlzzhz\",\"type\":\"txetlgydl\"}") - .toObject(PermissionBindingInner.class); - Assertions.assertEquals("ulajvlejchc", model.description()); - Assertions.assertEquals("lzk", model.topicSpaceName()); - Assertions.assertEquals(PermissionType.SUBSCRIBER, model.permission()); - Assertions.assertEquals("anrupdwvnphcn", model.clientGroupName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PermissionBindingInner model = new PermissionBindingInner().withDescription("ulajvlejchc") - .withTopicSpaceName("lzk") - .withPermission(PermissionType.SUBSCRIBER) - .withClientGroupName("anrupdwvnphcn"); - model = BinaryData.fromObject(model).toObject(PermissionBindingInner.class); - Assertions.assertEquals("ulajvlejchc", model.description()); - Assertions.assertEquals("lzk", model.topicSpaceName()); - Assertions.assertEquals(PermissionType.SUBSCRIBER, model.permission()); - Assertions.assertEquals("anrupdwvnphcn", model.clientGroupName()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingPropertiesTests.java deleted file mode 100644 index 93c42673fe6c..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingProperties; -import com.azure.resourcemanager.eventgrid.models.PermissionType; -import org.junit.jupiter.api.Assertions; - -public final class PermissionBindingPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PermissionBindingProperties model = BinaryData.fromString( - "{\"description\":\"vlnnpx\",\"topicSpaceName\":\"afiqgeaarbgjekg\",\"permission\":\"Subscriber\",\"clientGroupName\":\"yulidwcwvm\",\"provisioningState\":\"Failed\"}") - .toObject(PermissionBindingProperties.class); - Assertions.assertEquals("vlnnpx", model.description()); - Assertions.assertEquals("afiqgeaarbgjekg", model.topicSpaceName()); - Assertions.assertEquals(PermissionType.SUBSCRIBER, model.permission()); - Assertions.assertEquals("yulidwcwvm", model.clientGroupName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PermissionBindingProperties model = new PermissionBindingProperties().withDescription("vlnnpx") - .withTopicSpaceName("afiqgeaarbgjekg") - .withPermission(PermissionType.SUBSCRIBER) - .withClientGroupName("yulidwcwvm"); - model = BinaryData.fromObject(model).toObject(PermissionBindingProperties.class); - Assertions.assertEquals("vlnnpx", model.description()); - Assertions.assertEquals("afiqgeaarbgjekg", model.topicSpaceName()); - Assertions.assertEquals(PermissionType.SUBSCRIBER, model.permission()); - Assertions.assertEquals("yulidwcwvm", model.clientGroupName()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsCreateOrUpdateMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsCreateOrUpdateMockTests.java deleted file mode 100644 index e87a4446108f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PermissionBinding; -import com.azure.resourcemanager.eventgrid.models.PermissionType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PermissionBindingsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"description\":\"dizhrjqfyaytvsly\",\"topicSpaceName\":\"cgniuarlc\",\"permission\":\"Publisher\",\"clientGroupName\":\"sxfai\",\"provisioningState\":\"Succeeded\"},\"id\":\"gujjgn\",\"name\":\"grzxbarcbpaefzqs\",\"type\":\"mjw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PermissionBinding response = manager.permissionBindings() - .define("tfnressfepgck") - .withExistingNamespace("ppoqvgpnewuhwfwj", "oxuo") - .withDescription("mgvsnvbtqdxfmj") - .withTopicSpaceName("jnhj") - .withPermission(PermissionType.SUBSCRIBER) - .withClientGroupName("lbsu") - .create(); - - Assertions.assertEquals("dizhrjqfyaytvsly", response.description()); - Assertions.assertEquals("cgniuarlc", response.topicSpaceName()); - Assertions.assertEquals(PermissionType.PUBLISHER, response.permission()); - Assertions.assertEquals("sxfai", response.clientGroupName()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsDeleteMockTests.java deleted file mode 100644 index ad01b0288c2c..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PermissionBindingsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.permissionBindings() - .delete("tobdrrpnre", "kunsbfjhhlwtpkv", "geattbzkg", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsGetWithResponseMockTests.java deleted file mode 100644 index deec079afb34..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsGetWithResponseMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PermissionBinding; -import com.azure.resourcemanager.eventgrid.models.PermissionType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PermissionBindingsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"description\":\"yqvpbfjpo\",\"topicSpaceName\":\"ucfzluczdquu\",\"permission\":\"Publisher\",\"clientGroupName\":\"mvhvz\",\"provisioningState\":\"Creating\"},\"id\":\"prnquj\",\"name\":\"wzcqygg\",\"type\":\"nwsvhbngqiwye\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PermissionBinding response = manager.permissionBindings() - .getWithResponse("ss", "hmgw", "nivrxpfduio", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("yqvpbfjpo", response.description()); - Assertions.assertEquals("ucfzluczdquu", response.topicSpaceName()); - Assertions.assertEquals(PermissionType.PUBLISHER, response.permission()); - Assertions.assertEquals("mvhvz", response.clientGroupName()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListByNamespaceMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListByNamespaceMockTests.java deleted file mode 100644 index 979f116faaac..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListByNamespaceMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PermissionBinding; -import com.azure.resourcemanager.eventgrid.models.PermissionType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PermissionBindingsListByNamespaceMockTests { - @Test - public void testListByNamespace() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"flpd\",\"topicSpaceName\":\"fnonpiyuxlvrhp\",\"permission\":\"Subscriber\",\"clientGroupName\":\"wonleqflvtlr\",\"provisioningState\":\"Canceled\"},\"id\":\"phuykun\",\"name\":\"nttlnrjd\",\"type\":\"zdbuzici\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.permissionBindings() - .listByNamespace("z", "nwqsttewu", "cysje", 942812433, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("flpd", response.iterator().next().description()); - Assertions.assertEquals("fnonpiyuxlvrhp", response.iterator().next().topicSpaceName()); - Assertions.assertEquals(PermissionType.SUBSCRIBER, response.iterator().next().permission()); - Assertions.assertEquals("wonleqflvtlr", response.iterator().next().clientGroupName()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListResultTests.java deleted file mode 100644 index e1f5f479e180..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListResultTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner; -import com.azure.resourcemanager.eventgrid.models.PermissionBindingsListResult; -import com.azure.resourcemanager.eventgrid.models.PermissionType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PermissionBindingsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PermissionBindingsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"description\":\"hj\",\"topicSpaceName\":\"wgdnqzbr\",\"permission\":\"Subscriber\",\"clientGroupName\":\"zhzmtksjci\",\"provisioningState\":\"Updating\"},\"id\":\"sxcdgljplkeuach\",\"name\":\"omflrytswfp\",\"type\":\"mdgycxn\"}],\"nextLink\":\"kwhqj\"}") - .toObject(PermissionBindingsListResult.class); - Assertions.assertEquals("hj", model.value().get(0).description()); - Assertions.assertEquals("wgdnqzbr", model.value().get(0).topicSpaceName()); - Assertions.assertEquals(PermissionType.SUBSCRIBER, model.value().get(0).permission()); - Assertions.assertEquals("zhzmtksjci", model.value().get(0).clientGroupName()); - Assertions.assertEquals("kwhqj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PermissionBindingsListResult model = new PermissionBindingsListResult() - .withValue(Arrays.asList(new PermissionBindingInner().withDescription("hj") - .withTopicSpaceName("wgdnqzbr") - .withPermission(PermissionType.SUBSCRIBER) - .withClientGroupName("zhzmtksjci"))) - .withNextLink("kwhqj"); - model = BinaryData.fromObject(model).toObject(PermissionBindingsListResult.class); - Assertions.assertEquals("hj", model.value().get(0).description()); - Assertions.assertEquals("wgdnqzbr", model.value().get(0).topicSpaceName()); - Assertions.assertEquals(PermissionType.SUBSCRIBER, model.value().get(0).permission()); - Assertions.assertEquals("zhzmtksjci", model.value().get(0).clientGroupName()); - Assertions.assertEquals("kwhqj", model.nextLink()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index 20e193d56676..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionInnerTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.eventgrid.models.ConnectionState; -import com.azure.resourcemanager.eventgrid.models.PersistedConnectionStatus; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpoint; -import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"eiotwmcdytdx\"},\"groupIds\":[\"xnrj\",\"wgqwgxhn\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"bkpyc\",\"actionsRequired\":\"lwn\"},\"provisioningState\":\"Failed\"},\"id\":\"jdauwhvy\",\"name\":\"wzbtdhxu\",\"type\":\"znbmpowuwprzq\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("eiotwmcdytdx", model.privateEndpoint().id()); - Assertions.assertEquals("xnrj", model.groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bkpyc", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lwn", model.privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.FAILED, model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("eiotwmcdytdx")) - .withGroupIds(Arrays.asList("xnrj", "wgqwgxhn")) - .withPrivateLinkServiceConnectionState(new ConnectionState().withStatus(PersistedConnectionStatus.PENDING) - .withDescription("bkpyc") - .withActionsRequired("lwn")) - .withProvisioningState(ResourceProvisioningState.FAILED); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("eiotwmcdytdx", model.privateEndpoint().id()); - Assertions.assertEquals("xnrj", model.groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bkpyc", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lwn", model.privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.FAILED, model.provisioningState()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index 1247e4952a79..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionListResultTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.eventgrid.models.ConnectionState; -import com.azure.resourcemanager.eventgrid.models.PersistedConnectionStatus; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpoint; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"lpshhkvpedwqslsr\"},\"groupIds\":[\"qvwwsko\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"wimuvqej\",\"actionsRequired\":\"ovyrrleaesinu\"},\"provisioningState\":\"Failed\"},\"id\":\"jqo\",\"name\":\"bpihehcecybmrqbr\",\"type\":\"bbmpxdlvykfre\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"eqwjksgh\"},\"groupIds\":[\"zhxogjggsvo\",\"jkxibda\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"dyomkxfbv\",\"actionsRequired\":\"hd\"},\"provisioningState\":\"Creating\"},\"id\":\"hpwpgddeimawzovg\",\"name\":\"kumuikjcjca\",\"type\":\"tbw\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"owxwcomli\"},\"groupIds\":[\"wvczcswkacve\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"lvhbwrnf\",\"actionsRequired\":\"gddpq\"},\"provisioningState\":\"Succeeded\"},\"id\":\"hn\",\"name\":\"naoyank\",\"type\":\"oe\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"nkltytmh\"},\"groupIds\":[\"znnhd\",\"lktgjc\",\"gguxhemlwyw\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"gfbukklelss\",\"actionsRequired\":\"lycsxz\"},\"provisioningState\":\"Updating\"},\"id\":\"srlsmd\",\"name\":\"sqplpvmjcd\",\"type\":\"ewbidyvteowxv\"}],\"nextLink\":\"iudeu\"}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("lpshhkvpedwqslsr", model.value().get(0).privateEndpoint().id()); - Assertions.assertEquals("qvwwsko", model.value().get(0).groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("wimuvqej", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ovyrrleaesinu", - model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.FAILED, model.value().get(0).provisioningState()); - Assertions.assertEquals("iudeu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResult model - = new PrivateEndpointConnectionListResult() - .withValue(Arrays.asList( - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("lpshhkvpedwqslsr")) - .withGroupIds(Arrays.asList("qvwwsko")) - .withPrivateLinkServiceConnectionState( - new ConnectionState().withStatus(PersistedConnectionStatus.DISCONNECTED) - .withDescription("wimuvqej") - .withActionsRequired("ovyrrleaesinu")) - .withProvisioningState(ResourceProvisioningState.FAILED), - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("eqwjksgh")) - .withGroupIds(Arrays.asList("zhxogjggsvo", "jkxibda")) - .withPrivateLinkServiceConnectionState( - new ConnectionState().withStatus(PersistedConnectionStatus.DISCONNECTED) - .withDescription("dyomkxfbv") - .withActionsRequired("hd")) - .withProvisioningState(ResourceProvisioningState.CREATING), - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("owxwcomli")) - .withGroupIds(Arrays.asList("wvczcswkacve")) - .withPrivateLinkServiceConnectionState( - new ConnectionState().withStatus(PersistedConnectionStatus.DISCONNECTED) - .withDescription("lvhbwrnf") - .withActionsRequired("gddpq")) - .withProvisioningState(ResourceProvisioningState.SUCCEEDED), - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("nkltytmh")) - .withGroupIds(Arrays.asList("znnhd", "lktgjc", "gguxhemlwyw")) - .withPrivateLinkServiceConnectionState( - new ConnectionState().withStatus(PersistedConnectionStatus.PENDING) - .withDescription("gfbukklelss") - .withActionsRequired("lycsxz")) - .withProvisioningState(ResourceProvisioningState.UPDATING))) - .withNextLink("iudeu"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("lpshhkvpedwqslsr", model.value().get(0).privateEndpoint().id()); - Assertions.assertEquals("qvwwsko", model.value().get(0).groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("wimuvqej", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ovyrrleaesinu", - model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.FAILED, model.value().get(0).provisioningState()); - Assertions.assertEquals("iudeu", model.nextLink()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index b33be77b03cb..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.eventgrid.models.ConnectionState; -import com.azure.resourcemanager.eventgrid.models.PersistedConnectionStatus; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpoint; -import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"privateEndpoint\":{\"id\":\"ualupjmkh\"},\"groupIds\":[\"bbcswsrtjri\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"bewtghfg\",\"actionsRequired\":\"c\"},\"provisioningState\":\"Deleting\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("ualupjmkh", model.privateEndpoint().id()); - Assertions.assertEquals("bbcswsrtjri", model.groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bewtghfg", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("c", model.privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.DELETING, model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint().withId("ualupjmkh")) - .withGroupIds(Arrays.asList("bbcswsrtjri")) - .withPrivateLinkServiceConnectionState(new ConnectionState().withStatus(PersistedConnectionStatus.REJECTED) - .withDescription("bewtghfg") - .withActionsRequired("c")) - .withProvisioningState(ResourceProvisioningState.DELETING); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("ualupjmkh", model.privateEndpoint().id()); - Assertions.assertEquals("bbcswsrtjri", model.groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bewtghfg", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("c", model.privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.DELETING, model.provisioningState()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index b57ae1437852..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PersistedConnectionStatus; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnection; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType; -import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"vhjudxdyyrudmahs\"},\"groupIds\":[\"dkxbq\",\"sgfenffdxb\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"chivdrijanxndmuv\",\"actionsRequired\":\"dlmz\"},\"provisioningState\":\"Creating\"},\"id\":\"p\",\"name\":\"rmuhcuhtuzlx\",\"type\":\"wyopgarpfctwrapc\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("njcytesmfucrtfod", PrivateEndpointConnectionsParentType.TOPICS, "uauzmz", "vrtrfz", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vhjudxdyyrudmahs", response.privateEndpoint().id()); - Assertions.assertEquals("dkxbq", response.groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.APPROVED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("chivdrijanxndmuv", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dlmz", response.privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.CREATING, response.provisioningState()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceMockTests.java deleted file mode 100644 index c2a3c3107c8f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PersistedConnectionStatus; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnection; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType; -import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListByResourceMockTests { - @Test - public void testListByResource() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"vuftrsvjmnsvu\"},\"groupIds\":[\"ktvole\",\"cjisepkdbxotfbja\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"lannmxynlsuqbw\",\"actionsRequired\":\"trkt\"},\"provisioningState\":\"Succeeded\"},\"id\":\"atr\",\"name\":\"jjktfin\",\"type\":\"hoksmmculwk\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.privateEndpointConnections() - .listByResource("kwopswnyinxupr", PrivateEndpointConnectionsParentType.NAMESPACES, "yxwjezb", "qployu", - 1539434217, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vuftrsvjmnsvu", response.iterator().next().privateEndpoint().id()); - Assertions.assertEquals("ktvole", response.iterator().next().groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lannmxynlsuqbw", - response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("trkt", - response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.SUCCEEDED, response.iterator().next().provisioningState()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateMockTests.java deleted file mode 100644 index f27991f3f0fe..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.eventgrid.models.ConnectionState; -import com.azure.resourcemanager.eventgrid.models.PersistedConnectionStatus; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpoint; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnection; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType; -import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"imtcvvf\"},\"groupIds\":[\"ytzfsl\",\"izhqikmgobl\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"diiisklbonxxup\",\"actionsRequired\":\"vtrkfkg\"},\"provisioningState\":\"Succeeded\"},\"id\":\"qnnp\",\"name\":\"wkosnyxigf\",\"type\":\"ujjcxgdqmrlhn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = manager.privateEndpointConnections() - .update("dojq", PrivateEndpointConnectionsParentType.PARTNER_NAMESPACES, "zesi", "iysnjqyowaadc", - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("a")) - .withGroupIds(Arrays.asList("dtsewkaupwhlzyc", "remgjlms", "dorsirxxhy")) - .withPrivateLinkServiceConnectionState( - new ConnectionState().withStatus(PersistedConnectionStatus.DISCONNECTED) - .withDescription("ofajfreprfvmkin") - .withActionsRequired("eyrqshixbcejop")) - .withProvisioningState(ResourceProvisioningState.UPDATING), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("imtcvvf", response.privateEndpoint().id()); - Assertions.assertEquals("ytzfsl", response.groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.APPROVED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("diiisklbonxxup", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("vtrkfkg", response.privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.SUCCEEDED, response.provisioningState()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointTests.java deleted file mode 100644 index eda5f69f8926..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"vlvqhjkbegi\"}").toObject(PrivateEndpoint.class); - Assertions.assertEquals("vlvqhjkbegi", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint().withId("vlvqhjkbegi"); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("vlvqhjkbegi", model.id()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourceInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index 2ac74d079bdf..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PrivateLinkResourceInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"xzecpaxwkufykhvu\",\"displayName\":\"epmrut\",\"requiredMembers\":[\"baobn\",\"lujdjltymkmv\",\"uihywart\",\"pphkixkykxds\"],\"requiredZoneNames\":[\"emmucfxh\",\"kkflrmymyincqlhr\",\"s\"]},\"id\":\"lmiiiovg\",\"name\":\"gxuugqkctotio\",\"type\":\"xteqdptjgwdtg\"}") - .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("lmiiiovg", model.id()); - Assertions.assertEquals("gxuugqkctotio", model.name()); - Assertions.assertEquals("xteqdptjgwdtg", model.type()); - Assertions.assertEquals("xzecpaxwkufykhvu", model.groupId()); - Assertions.assertEquals("epmrut", model.displayName()); - Assertions.assertEquals("baobn", model.requiredMembers().get(0)); - Assertions.assertEquals("emmucfxh", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model = new PrivateLinkResourceInner().withId("lmiiiovg") - .withName("gxuugqkctotio") - .withType("xteqdptjgwdtg") - .withGroupId("xzecpaxwkufykhvu") - .withDisplayName("epmrut") - .withRequiredMembers(Arrays.asList("baobn", "lujdjltymkmv", "uihywart", "pphkixkykxds")) - .withRequiredZoneNames(Arrays.asList("emmucfxh", "kkflrmymyincqlhr", "s")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("lmiiiovg", model.id()); - Assertions.assertEquals("gxuugqkctotio", model.name()); - Assertions.assertEquals("xteqdptjgwdtg", model.type()); - Assertions.assertEquals("xzecpaxwkufykhvu", model.groupId()); - Assertions.assertEquals("epmrut", model.displayName()); - Assertions.assertEquals("baobn", model.requiredMembers().get(0)); - Assertions.assertEquals("emmucfxh", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcePropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index b186da44874e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PrivateLinkResourceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"ranblwphqlkccu\",\"displayName\":\"ygqwahoiu\",\"requiredMembers\":[\"niiprglvaw\",\"wzdufypivlsbb\",\"pmcubkmifoxxkub\"],\"requiredZoneNames\":[\"avp\",\"h\",\"rbqgvgov\",\"bbttefjo\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ranblwphqlkccu", model.groupId()); - Assertions.assertEquals("ygqwahoiu", model.displayName()); - Assertions.assertEquals("niiprglvaw", model.requiredMembers().get(0)); - Assertions.assertEquals("avp", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = new PrivateLinkResourceProperties().withGroupId("ranblwphqlkccu") - .withDisplayName("ygqwahoiu") - .withRequiredMembers(Arrays.asList("niiprglvaw", "wzdufypivlsbb", "pmcubkmifoxxkub")) - .withRequiredZoneNames(Arrays.asList("avp", "h", "rbqgvgov", "bbttefjo")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ranblwphqlkccu", model.groupId()); - Assertions.assertEquals("ygqwahoiu", model.displayName()); - Assertions.assertEquals("niiprglvaw", model.requiredMembers().get(0)); - Assertions.assertEquals("avp", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetWithResponseMockTests.java deleted file mode 100644 index d13bbec1c5ed..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PrivateLinkResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"groupId\":\"jiswllu\",\"displayName\":\"xhfwlfxzfwuge\",\"requiredMembers\":[\"knecexkgrv\",\"psjdmng\",\"yt\"],\"requiredZoneNames\":[\"zfyxcnwawoxcg\",\"bejqfbifopfjx\",\"wdrpa\",\"q\"]},\"id\":\"rfm\",\"name\":\"otfcuuugtjigpg\",\"type\":\"iawohfmhn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResource response = manager.privateLinkResources() - .getWithResponse("icruo", "krjflsgaojb", "qpqsdoctpzpuj", "flmcdsgxc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rfm", response.id()); - Assertions.assertEquals("otfcuuugtjigpg", response.name()); - Assertions.assertEquals("iawohfmhn", response.type()); - Assertions.assertEquals("jiswllu", response.groupId()); - Assertions.assertEquals("xhfwlfxzfwuge", response.displayName()); - Assertions.assertEquals("knecexkgrv", response.requiredMembers().get(0)); - Assertions.assertEquals("zfyxcnwawoxcg", response.requiredZoneNames().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceMockTests.java deleted file mode 100644 index 39b9f0b5a152..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceMockTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.PrivateLinkResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesListByResourceMockTests { - @Test - public void testListByResource() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"pkhc\",\"displayName\":\"aqxukuicjufte\",\"requiredMembers\":[\"oanduewfhvpxjhx\"],\"requiredZoneNames\":[\"fjz\",\"bbwzgvzuaixcd\",\"kixsps\",\"igavk\"]},\"id\":\"yxzerejr\",\"name\":\"zjbyetjxryopta\",\"type\":\"twhlbecgih\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.privateLinkResources() - .listByResource("zmecjjkmqenhai", "zrpv", "gloiovsl", "ivqsuvwtenb", 1771574336, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("yxzerejr", response.iterator().next().id()); - Assertions.assertEquals("zjbyetjxryopta", response.iterator().next().name()); - Assertions.assertEquals("twhlbecgih", response.iterator().next().type()); - Assertions.assertEquals("pkhc", response.iterator().next().groupId()); - Assertions.assertEquals("aqxukuicjufte", response.iterator().next().displayName()); - Assertions.assertEquals("oanduewfhvpxjhx", response.iterator().next().requiredMembers().get(0)); - Assertions.assertEquals("fjz", response.iterator().next().requiredZoneNames().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListResultTests.java deleted file mode 100644 index 1a2c6dc12aa9..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListResultTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.eventgrid.models.PrivateLinkResourcesListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourcesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"yzqedikdfrd\",\"displayName\":\"qmrjg\",\"requiredMembers\":[\"fqlggw\",\"iwzcxmjpbyeph\"],\"requiredZoneNames\":[\"vljvrc\"]},\"id\":\"fqip\",\"name\":\"hnp\",\"type\":\"yqwcabvnuil\"},{\"properties\":{\"groupId\":\"aswlp\",\"displayName\":\"gm\",\"requiredMembers\":[\"jlrxwtoaukhfk\",\"cisiz\",\"oaedsxjwuivedwcg\"],\"requiredZoneNames\":[\"wxeiqbpsmgomg\",\"amljdlrgmsplzgau\",\"cshhv\"]},\"id\":\"wgnxkympqanxrj\",\"name\":\"xtwbta\",\"type\":\"pnyghs\"},{\"properties\":{\"groupId\":\"ylhk\",\"displayName\":\"nsghp\",\"requiredMembers\":[\"phdrw\",\"jkhvyomacluzvxnq\",\"hrpq\",\"df\"],\"requiredZoneNames\":[\"oi\"]},\"id\":\"css\",\"name\":\"xuifmcsypobkdqz\",\"type\":\"zsylollgt\"}],\"nextLink\":\"zzydmxzjijpvua\"}") - .toObject(PrivateLinkResourcesListResult.class); - Assertions.assertEquals("fqip", model.value().get(0).id()); - Assertions.assertEquals("hnp", model.value().get(0).name()); - Assertions.assertEquals("yqwcabvnuil", model.value().get(0).type()); - Assertions.assertEquals("yzqedikdfrd", model.value().get(0).groupId()); - Assertions.assertEquals("qmrjg", model.value().get(0).displayName()); - Assertions.assertEquals("fqlggw", model.value().get(0).requiredMembers().get(0)); - Assertions.assertEquals("vljvrc", model.value().get(0).requiredZoneNames().get(0)); - Assertions.assertEquals("zzydmxzjijpvua", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourcesListResult model = new PrivateLinkResourcesListResult().withValue(Arrays.asList( - new PrivateLinkResourceInner().withId("fqip") - .withName("hnp") - .withType("yqwcabvnuil") - .withGroupId("yzqedikdfrd") - .withDisplayName("qmrjg") - .withRequiredMembers(Arrays.asList("fqlggw", "iwzcxmjpbyeph")) - .withRequiredZoneNames(Arrays.asList("vljvrc")), - new PrivateLinkResourceInner().withId("wgnxkympqanxrj") - .withName("xtwbta") - .withType("pnyghs") - .withGroupId("aswlp") - .withDisplayName("gm") - .withRequiredMembers(Arrays.asList("jlrxwtoaukhfk", "cisiz", "oaedsxjwuivedwcg")) - .withRequiredZoneNames(Arrays.asList("wxeiqbpsmgomg", "amljdlrgmsplzgau", "cshhv")), - new PrivateLinkResourceInner().withId("css") - .withName("xuifmcsypobkdqz") - .withType("zsylollgt") - .withGroupId("ylhk") - .withDisplayName("nsghp") - .withRequiredMembers(Arrays.asList("phdrw", "jkhvyomacluzvxnq", "hrpq", "df")) - .withRequiredZoneNames(Arrays.asList("oi")))) - .withNextLink("zzydmxzjijpvua"); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourcesListResult.class); - Assertions.assertEquals("fqip", model.value().get(0).id()); - Assertions.assertEquals("hnp", model.value().get(0).name()); - Assertions.assertEquals("yqwcabvnuil", model.value().get(0).type()); - Assertions.assertEquals("yzqedikdfrd", model.value().get(0).groupId()); - Assertions.assertEquals("qmrjg", model.value().get(0).displayName()); - Assertions.assertEquals("fqlggw", model.value().get(0).requiredMembers().get(0)); - Assertions.assertEquals("vljvrc", model.value().get(0).requiredZoneNames().get(0)); - Assertions.assertEquals("zzydmxzjijpvua", model.nextLink()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PushInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PushInfoTests.java deleted file mode 100644 index f9c57689a1c0..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PushInfoTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeadLetterDestination; -import com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity; -import com.azure.resourcemanager.eventgrid.models.DeliveryWithResourceIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionDestination; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentityType; -import com.azure.resourcemanager.eventgrid.models.PushInfo; -import org.junit.jupiter.api.Assertions; - -public final class PushInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PushInfo model = BinaryData.fromString( - "{\"maxDeliveryCount\":357492176,\"eventTimeToLive\":\"tdlmkkzevd\",\"deadLetterDestinationWithResourceIdentity\":{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"sdsttwvog\"},\"deadLetterDestination\":{\"endpointType\":\"DeadLetterDestination\"}},\"deliveryWithResourceIdentity\":{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"ngqqmoakuf\"},\"destination\":{\"endpointType\":\"EventSubscriptionDestination\"}},\"destination\":{\"endpointType\":\"EventSubscriptionDestination\"}}") - .toObject(PushInfo.class); - Assertions.assertEquals(357492176, model.maxDeliveryCount()); - Assertions.assertEquals("tdlmkkzevd", model.eventTimeToLive()); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, - model.deadLetterDestinationWithResourceIdentity().identity().type()); - Assertions.assertEquals("sdsttwvog", - model.deadLetterDestinationWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals(EventSubscriptionIdentityType.USER_ASSIGNED, - model.deliveryWithResourceIdentity().identity().type()); - Assertions.assertEquals("ngqqmoakuf", model.deliveryWithResourceIdentity().identity().userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PushInfo model - = new PushInfo().withMaxDeliveryCount(357492176) - .withEventTimeToLive("tdlmkkzevd") - .withDeadLetterDestinationWithResourceIdentity(new DeadLetterWithResourceIdentity() - .withIdentity( - new EventSubscriptionIdentity().withType(EventSubscriptionIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("sdsttwvog")) - .withDeadLetterDestination(new DeadLetterDestination())) - .withDeliveryWithResourceIdentity( - new DeliveryWithResourceIdentity() - .withIdentity( - new EventSubscriptionIdentity().withType(EventSubscriptionIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("ngqqmoakuf")) - .withDestination(new EventSubscriptionDestination())) - .withDestination(new EventSubscriptionDestination()); - model = BinaryData.fromObject(model).toObject(PushInfo.class); - Assertions.assertEquals(357492176, model.maxDeliveryCount()); - Assertions.assertEquals("tdlmkkzevd", model.eventTimeToLive()); - Assertions.assertEquals(EventSubscriptionIdentityType.SYSTEM_ASSIGNED, - model.deadLetterDestinationWithResourceIdentity().identity().type()); - Assertions.assertEquals("sdsttwvog", - model.deadLetterDestinationWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals(EventSubscriptionIdentityType.USER_ASSIGNED, - model.deliveryWithResourceIdentity().identity().type()); - Assertions.assertEquals("ngqqmoakuf", model.deliveryWithResourceIdentity().identity().userAssignedIdentity()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/QueueInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/QueueInfoTests.java deleted file mode 100644 index 6fd938af4b79..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/QueueInfoTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeadLetterDestination; -import com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentityType; -import com.azure.resourcemanager.eventgrid.models.QueueInfo; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class QueueInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QueueInfo model = BinaryData.fromString( - "{\"receiveLockDurationInSeconds\":1334975440,\"maxDeliveryCount\":531629361,\"deadLetterDestinationWithResourceIdentity\":{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"bykutw\"},\"deadLetterDestination\":{\"endpointType\":\"DeadLetterDestination\"}},\"eventTimeToLive\":\"PT32H3M35S\"}") - .toObject(QueueInfo.class); - Assertions.assertEquals(1334975440, model.receiveLockDurationInSeconds()); - Assertions.assertEquals(531629361, model.maxDeliveryCount()); - Assertions.assertEquals(EventSubscriptionIdentityType.USER_ASSIGNED, - model.deadLetterDestinationWithResourceIdentity().identity().type()); - Assertions.assertEquals("bykutw", - model.deadLetterDestinationWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals(Duration.parse("PT32H3M35S"), model.eventTimeToLive()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QueueInfo model - = new QueueInfo().withReceiveLockDurationInSeconds(1334975440) - .withMaxDeliveryCount(531629361) - .withDeadLetterDestinationWithResourceIdentity( - new DeadLetterWithResourceIdentity() - .withIdentity( - new EventSubscriptionIdentity().withType(EventSubscriptionIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("bykutw")) - .withDeadLetterDestination(new DeadLetterDestination())) - .withEventTimeToLive(Duration.parse("PT32H3M35S")); - model = BinaryData.fromObject(model).toObject(QueueInfo.class); - Assertions.assertEquals(1334975440, model.receiveLockDurationInSeconds()); - Assertions.assertEquals(531629361, model.maxDeliveryCount()); - Assertions.assertEquals(EventSubscriptionIdentityType.USER_ASSIGNED, - model.deadLetterDestinationWithResourceIdentity().identity().type()); - Assertions.assertEquals("bykutw", - model.deadLetterDestinationWithResourceIdentity().identity().userAssignedIdentity()); - Assertions.assertEquals(Duration.parse("PT32H3M35S"), model.eventTimeToLive()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceAssociationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceAssociationTests.java deleted file mode 100644 index 9de6dd9feb1a..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceAssociationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterAssociationAccessMode; -import com.azure.resourcemanager.eventgrid.models.ResourceAssociation; -import org.junit.jupiter.api.Assertions; - -public final class ResourceAssociationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceAssociation model = BinaryData.fromString("{\"name\":\"dyynfsvkhgb\",\"accessMode\":\"Learning\"}") - .toObject(ResourceAssociation.class); - Assertions.assertEquals("dyynfsvkhgb", model.name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.LEARNING, model.accessMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceAssociation model = new ResourceAssociation().withName("dyynfsvkhgb") - .withAccessMode(NetworkSecurityPerimeterAssociationAccessMode.LEARNING); - model = BinaryData.fromObject(model).toObject(ResourceAssociation.class); - Assertions.assertEquals("dyynfsvkhgb", model.name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.LEARNING, model.accessMode()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceMoveChangeHistoryTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceMoveChangeHistoryTests.java deleted file mode 100644 index 5d5101530d2f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceMoveChangeHistoryTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.ResourceMoveChangeHistory; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ResourceMoveChangeHistoryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceMoveChangeHistory model = BinaryData.fromString( - "{\"azureSubscriptionId\":\"modmglougpb\",\"resourceGroupName\":\"tmut\",\"changedTimeUtc\":\"2021-07-26T02:06:56Z\"}") - .toObject(ResourceMoveChangeHistory.class); - Assertions.assertEquals("modmglougpb", model.azureSubscriptionId()); - Assertions.assertEquals("tmut", model.resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T02:06:56Z"), model.changedTimeUtc()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceMoveChangeHistory model = new ResourceMoveChangeHistory().withAzureSubscriptionId("modmglougpb") - .withResourceGroupName("tmut") - .withChangedTimeUtc(OffsetDateTime.parse("2021-07-26T02:06:56Z")); - model = BinaryData.fromObject(model).toObject(ResourceMoveChangeHistory.class); - Assertions.assertEquals("modmglougpb", model.azureSubscriptionId()); - Assertions.assertEquals("tmut", model.resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T02:06:56Z"), model.changedTimeUtc()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceSkuTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceSkuTests.java deleted file mode 100644 index bb11d86ea022..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceSkuTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.ResourceSku; -import com.azure.resourcemanager.eventgrid.models.Sku; -import org.junit.jupiter.api.Assertions; - -public final class ResourceSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceSku model = BinaryData.fromString("{\"name\":\"Basic\"}").toObject(ResourceSku.class); - Assertions.assertEquals(Sku.BASIC, model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceSku model = new ResourceSku().withName(Sku.BASIC); - model = BinaryData.fromObject(model).toObject(ResourceSku.class); - Assertions.assertEquals(Sku.BASIC, model.name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/RetryPolicyTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/RetryPolicyTests.java deleted file mode 100644 index 5a5c76706fbf..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/RetryPolicyTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.RetryPolicy; -import org.junit.jupiter.api.Assertions; - -public final class RetryPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RetryPolicy model - = BinaryData.fromString("{\"maxDeliveryAttempts\":514038226,\"eventTimeToLiveInMinutes\":664044730}") - .toObject(RetryPolicy.class); - Assertions.assertEquals(514038226, model.maxDeliveryAttempts()); - Assertions.assertEquals(664044730, model.eventTimeToLiveInMinutes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RetryPolicy model - = new RetryPolicy().withMaxDeliveryAttempts(514038226).withEventTimeToLiveInMinutes(664044730); - model = BinaryData.fromObject(model).toObject(RetryPolicy.class); - Assertions.assertEquals(514038226, model.maxDeliveryAttempts()); - Assertions.assertEquals(664044730, model.eventTimeToLiveInMinutes()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/RoutingIdentityInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/RoutingIdentityInfoTests.java deleted file mode 100644 index 686b6631290e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/RoutingIdentityInfoTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.RoutingIdentityInfo; -import com.azure.resourcemanager.eventgrid.models.RoutingIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class RoutingIdentityInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RoutingIdentityInfo model - = BinaryData.fromString("{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"cvpa\"}") - .toObject(RoutingIdentityInfo.class); - Assertions.assertEquals(RoutingIdentityType.SYSTEM_ASSIGNED, model.type()); - Assertions.assertEquals("cvpa", model.userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoutingIdentityInfo model - = new RoutingIdentityInfo().withType(RoutingIdentityType.SYSTEM_ASSIGNED).withUserAssignedIdentity("cvpa"); - model = BinaryData.fromObject(model).toObject(RoutingIdentityInfo.class); - Assertions.assertEquals(RoutingIdentityType.SYSTEM_ASSIGNED, model.type()); - Assertions.assertEquals("cvpa", model.userAssignedIdentity()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusQueueEventSubscriptionDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusQueueEventSubscriptionDestinationPropertiesTests.java deleted file mode 100644 index 611114b94199..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusQueueEventSubscriptionDestinationPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ServiceBusQueueEventSubscriptionDestinationProperties; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceBusQueueEventSubscriptionDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceBusQueueEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"wnvz\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"oywsxvjabjqqaxu\"}]}") - .toObject(ServiceBusQueueEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("wnvz", model.resourceId()); - Assertions.assertEquals("oywsxvjabjqqaxu", model.deliveryAttributeMappings().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceBusQueueEventSubscriptionDestinationProperties model - = new ServiceBusQueueEventSubscriptionDestinationProperties().withResourceId("wnvz") - .withDeliveryAttributeMappings( - Arrays.asList(new DeliveryAttributeMapping().withName("oywsxvjabjqqaxu"))); - model = BinaryData.fromObject(model).toObject(ServiceBusQueueEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("wnvz", model.resourceId()); - Assertions.assertEquals("oywsxvjabjqqaxu", model.deliveryAttributeMappings().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusQueueEventSubscriptionDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusQueueEventSubscriptionDestinationTests.java deleted file mode 100644 index 2f5072ad4906..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusQueueEventSubscriptionDestinationTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import com.azure.resourcemanager.eventgrid.models.ServiceBusQueueEventSubscriptionDestination; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceBusQueueEventSubscriptionDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceBusQueueEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"ServiceBusQueue\",\"properties\":{\"resourceId\":\"mc\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"doabhj\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"xqweu\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"mp\"}]}}") - .toObject(ServiceBusQueueEventSubscriptionDestination.class); - Assertions.assertEquals("mc", model.resourceId()); - Assertions.assertEquals("doabhj", model.deliveryAttributeMappings().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceBusQueueEventSubscriptionDestination model - = new ServiceBusQueueEventSubscriptionDestination().withResourceId("mc") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("doabhj"), - new DeliveryAttributeMapping().withName("xqweu"), new DeliveryAttributeMapping().withName("mp"))); - model = BinaryData.fromObject(model).toObject(ServiceBusQueueEventSubscriptionDestination.class); - Assertions.assertEquals("mc", model.resourceId()); - Assertions.assertEquals("doabhj", model.deliveryAttributeMappings().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusTopicEventSubscriptionDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusTopicEventSubscriptionDestinationPropertiesTests.java deleted file mode 100644 index c4b26c39e68f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusTopicEventSubscriptionDestinationPropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.ServiceBusTopicEventSubscriptionDestinationProperties; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceBusTopicEventSubscriptionDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceBusTopicEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"smitnsqxtlt\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"dpqgfhyrfr\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"kldgrcwfcmfc\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"jajqmatxjt\"}]}") - .toObject(ServiceBusTopicEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("smitnsqxtlt", model.resourceId()); - Assertions.assertEquals("dpqgfhyrfr", model.deliveryAttributeMappings().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceBusTopicEventSubscriptionDestinationProperties model - = new ServiceBusTopicEventSubscriptionDestinationProperties().withResourceId("smitnsqxtlt") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("dpqgfhyrfr"), - new DeliveryAttributeMapping().withName("kldgrcwfcmfc"), - new DeliveryAttributeMapping().withName("jajqmatxjt"))); - model = BinaryData.fromObject(model).toObject(ServiceBusTopicEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("smitnsqxtlt", model.resourceId()); - Assertions.assertEquals("dpqgfhyrfr", model.deliveryAttributeMappings().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusTopicEventSubscriptionDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusTopicEventSubscriptionDestinationTests.java deleted file mode 100644 index 845baf25d2a1..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusTopicEventSubscriptionDestinationTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import com.azure.resourcemanager.eventgrid.models.ServiceBusTopicEventSubscriptionDestination; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceBusTopicEventSubscriptionDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceBusTopicEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"ServiceBusTopic\",\"properties\":{\"resourceId\":\"nzqgxxgfbbmtlpq\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"oiprnzcali\"}]}}") - .toObject(ServiceBusTopicEventSubscriptionDestination.class); - Assertions.assertEquals("nzqgxxgfbbmtlpq", model.resourceId()); - Assertions.assertEquals("oiprnzcali", model.deliveryAttributeMappings().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceBusTopicEventSubscriptionDestination model - = new ServiceBusTopicEventSubscriptionDestination().withResourceId("nzqgxxgfbbmtlpq") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("oiprnzcali"))); - model = BinaryData.fromObject(model).toObject(ServiceBusTopicEventSubscriptionDestination.class); - Assertions.assertEquals("nzqgxxgfbbmtlpq", model.resourceId()); - Assertions.assertEquals("oiprnzcali", model.deliveryAttributeMappings().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageBlobDeadLetterDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageBlobDeadLetterDestinationPropertiesTests.java deleted file mode 100644 index c84650d6356f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageBlobDeadLetterDestinationPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.StorageBlobDeadLetterDestinationProperties; -import org.junit.jupiter.api.Assertions; - -public final class StorageBlobDeadLetterDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageBlobDeadLetterDestinationProperties model - = BinaryData.fromString("{\"resourceId\":\"kcrr\",\"blobContainerName\":\"eek\"}") - .toObject(StorageBlobDeadLetterDestinationProperties.class); - Assertions.assertEquals("kcrr", model.resourceId()); - Assertions.assertEquals("eek", model.blobContainerName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageBlobDeadLetterDestinationProperties model - = new StorageBlobDeadLetterDestinationProperties().withResourceId("kcrr").withBlobContainerName("eek"); - model = BinaryData.fromObject(model).toObject(StorageBlobDeadLetterDestinationProperties.class); - Assertions.assertEquals("kcrr", model.resourceId()); - Assertions.assertEquals("eek", model.blobContainerName()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageBlobDeadLetterDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageBlobDeadLetterDestinationTests.java deleted file mode 100644 index da2a35b9033d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageBlobDeadLetterDestinationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.StorageBlobDeadLetterDestination; -import org.junit.jupiter.api.Assertions; - -public final class StorageBlobDeadLetterDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageBlobDeadLetterDestination model = BinaryData.fromString( - "{\"endpointType\":\"StorageBlob\",\"properties\":{\"resourceId\":\"eh\",\"blobContainerName\":\"ddacbcbgydlqidy\"}}") - .toObject(StorageBlobDeadLetterDestination.class); - Assertions.assertEquals("eh", model.resourceId()); - Assertions.assertEquals("ddacbcbgydlqidy", model.blobContainerName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageBlobDeadLetterDestination model - = new StorageBlobDeadLetterDestination().withResourceId("eh").withBlobContainerName("ddacbcbgydlqidy"); - model = BinaryData.fromObject(model).toObject(StorageBlobDeadLetterDestination.class); - Assertions.assertEquals("eh", model.resourceId()); - Assertions.assertEquals("ddacbcbgydlqidy", model.blobContainerName()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageQueueEventSubscriptionDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageQueueEventSubscriptionDestinationPropertiesTests.java deleted file mode 100644 index 9916c09c17c0..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageQueueEventSubscriptionDestinationPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.StorageQueueEventSubscriptionDestinationProperties; -import org.junit.jupiter.api.Assertions; - -public final class StorageQueueEventSubscriptionDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageQueueEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"snlaimoux\",\"queueName\":\"sqmu\",\"queueMessageTimeToLiveInSeconds\":2937834527529214478}") - .toObject(StorageQueueEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("snlaimoux", model.resourceId()); - Assertions.assertEquals("sqmu", model.queueName()); - Assertions.assertEquals(2937834527529214478L, model.queueMessageTimeToLiveInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageQueueEventSubscriptionDestinationProperties model - = new StorageQueueEventSubscriptionDestinationProperties().withResourceId("snlaimoux") - .withQueueName("sqmu") - .withQueueMessageTimeToLiveInSeconds(2937834527529214478L); - model = BinaryData.fromObject(model).toObject(StorageQueueEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("snlaimoux", model.resourceId()); - Assertions.assertEquals("sqmu", model.queueName()); - Assertions.assertEquals(2937834527529214478L, model.queueMessageTimeToLiveInSeconds()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageQueueEventSubscriptionDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageQueueEventSubscriptionDestinationTests.java deleted file mode 100644 index e3fcb8d07c21..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageQueueEventSubscriptionDestinationTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.StorageQueueEventSubscriptionDestination; -import org.junit.jupiter.api.Assertions; - -public final class StorageQueueEventSubscriptionDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageQueueEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"StorageQueue\",\"properties\":{\"resourceId\":\"bicziuswswj\",\"queueName\":\"b\",\"queueMessageTimeToLiveInSeconds\":6634581254816359607}}") - .toObject(StorageQueueEventSubscriptionDestination.class); - Assertions.assertEquals("bicziuswswj", model.resourceId()); - Assertions.assertEquals("b", model.queueName()); - Assertions.assertEquals(6634581254816359607L, model.queueMessageTimeToLiveInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageQueueEventSubscriptionDestination model - = new StorageQueueEventSubscriptionDestination().withResourceId("bicziuswswj") - .withQueueName("b") - .withQueueMessageTimeToLiveInSeconds(6634581254816359607L); - model = BinaryData.fromObject(model).toObject(StorageQueueEventSubscriptionDestination.class); - Assertions.assertEquals("bicziuswswj", model.resourceId()); - Assertions.assertEquals("b", model.queueName()); - Assertions.assertEquals(6634581254816359607L, model.queueMessageTimeToLiveInSeconds()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SubscriptionFullUrlInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SubscriptionFullUrlInnerTests.java deleted file mode 100644 index 450894d89836..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SubscriptionFullUrlInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionFullUrlInner; -import org.junit.jupiter.api.Assertions; - -public final class SubscriptionFullUrlInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionFullUrlInner model - = BinaryData.fromString("{\"endpointUrl\":\"vop\"}").toObject(SubscriptionFullUrlInner.class); - Assertions.assertEquals("vop", model.endpointUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionFullUrlInner model = new SubscriptionFullUrlInner().withEndpointUrl("vop"); - model = BinaryData.fromObject(model).toObject(SubscriptionFullUrlInner.class); - Assertions.assertEquals("vop", model.endpointUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SubscriptionsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SubscriptionsListResultTests.java deleted file mode 100644 index b7f2880a98a9..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SubscriptionsListResultTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner; -import com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity; -import com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration; -import com.azure.resourcemanager.eventgrid.models.DeliveryMode; -import com.azure.resourcemanager.eventgrid.models.DeliverySchema; -import com.azure.resourcemanager.eventgrid.models.DeliveryWithResourceIdentity; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionDestination; -import com.azure.resourcemanager.eventgrid.models.Filter; -import com.azure.resourcemanager.eventgrid.models.FiltersConfiguration; -import com.azure.resourcemanager.eventgrid.models.PushInfo; -import com.azure.resourcemanager.eventgrid.models.QueueInfo; -import com.azure.resourcemanager.eventgrid.models.SubscriptionsListResult; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubscriptionsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"CreateFailed\",\"deliveryConfiguration\":{\"deliveryMode\":\"Queue\",\"queue\":{\"receiveLockDurationInSeconds\":1772726150,\"maxDeliveryCount\":1032415559,\"deadLetterDestinationWithResourceIdentity\":{},\"eventTimeToLive\":\"PT37H9M19S\"},\"push\":{\"maxDeliveryCount\":165046754,\"eventTimeToLive\":\"unyowxwl\",\"deadLetterDestinationWithResourceIdentity\":{},\"deliveryWithResourceIdentity\":{},\"destination\":{\"endpointType\":\"EventSubscriptionDestination\"}}},\"eventDeliverySchema\":\"CloudEventSchemaV1_0\",\"filtersConfiguration\":{\"includedEventTypes\":[\"vfvpdbodaciz\",\"j\",\"lhkrribdeibqipqk\"],\"filters\":[{\"operatorType\":\"Filter\"},{\"operatorType\":\"Filter\"}]},\"expirationTimeUtc\":\"2021-11-17T03:58:19Z\"},\"id\":\"zwmk\",\"name\":\"efajpj\",\"type\":\"rwkq\"}],\"nextLink\":\"hgbijt\"}") - .toObject(SubscriptionsListResult.class); - Assertions.assertEquals(DeliveryMode.QUEUE, model.value().get(0).deliveryConfiguration().deliveryMode()); - Assertions.assertEquals(1772726150, - model.value().get(0).deliveryConfiguration().queue().receiveLockDurationInSeconds()); - Assertions.assertEquals(1032415559, model.value().get(0).deliveryConfiguration().queue().maxDeliveryCount()); - Assertions.assertEquals(Duration.parse("PT37H9M19S"), - model.value().get(0).deliveryConfiguration().queue().eventTimeToLive()); - Assertions.assertEquals(165046754, model.value().get(0).deliveryConfiguration().push().maxDeliveryCount()); - Assertions.assertEquals("unyowxwl", model.value().get(0).deliveryConfiguration().push().eventTimeToLive()); - Assertions.assertEquals(DeliverySchema.CLOUD_EVENT_SCHEMA_V1_0, model.value().get(0).eventDeliverySchema()); - Assertions.assertEquals("vfvpdbodaciz", - model.value().get(0).filtersConfiguration().includedEventTypes().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-17T03:58:19Z"), model.value().get(0).expirationTimeUtc()); - Assertions.assertEquals("hgbijt", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionsListResult model - = new SubscriptionsListResult() - .withValue( - Arrays - .asList( - new SubscriptionInner() - .withDeliveryConfiguration( - new DeliveryConfiguration().withDeliveryMode(DeliveryMode.QUEUE) - .withQueue(new QueueInfo().withReceiveLockDurationInSeconds(1772726150) - .withMaxDeliveryCount(1032415559) - .withDeadLetterDestinationWithResourceIdentity( - new DeadLetterWithResourceIdentity()) - .withEventTimeToLive(Duration.parse("PT37H9M19S"))) - .withPush(new PushInfo().withMaxDeliveryCount(165046754) - .withEventTimeToLive("unyowxwl") - .withDeadLetterDestinationWithResourceIdentity( - new DeadLetterWithResourceIdentity()) - .withDeliveryWithResourceIdentity(new DeliveryWithResourceIdentity()) - .withDestination(new EventSubscriptionDestination()))) - .withEventDeliverySchema(DeliverySchema.CLOUD_EVENT_SCHEMA_V1_0) - .withFiltersConfiguration(new FiltersConfiguration() - .withIncludedEventTypes(Arrays.asList("vfvpdbodaciz", "j", "lhkrribdeibqipqk")) - .withFilters(Arrays.asList(new Filter(), new Filter()))) - .withExpirationTimeUtc(OffsetDateTime.parse("2021-11-17T03:58:19Z")))) - .withNextLink("hgbijt"); - model = BinaryData.fromObject(model).toObject(SubscriptionsListResult.class); - Assertions.assertEquals(DeliveryMode.QUEUE, model.value().get(0).deliveryConfiguration().deliveryMode()); - Assertions.assertEquals(1772726150, - model.value().get(0).deliveryConfiguration().queue().receiveLockDurationInSeconds()); - Assertions.assertEquals(1032415559, model.value().get(0).deliveryConfiguration().queue().maxDeliveryCount()); - Assertions.assertEquals(Duration.parse("PT37H9M19S"), - model.value().get(0).deliveryConfiguration().queue().eventTimeToLive()); - Assertions.assertEquals(165046754, model.value().get(0).deliveryConfiguration().push().maxDeliveryCount()); - Assertions.assertEquals("unyowxwl", model.value().get(0).deliveryConfiguration().push().eventTimeToLive()); - Assertions.assertEquals(DeliverySchema.CLOUD_EVENT_SCHEMA_V1_0, model.value().get(0).eventDeliverySchema()); - Assertions.assertEquals("vfvpdbodaciz", - model.value().get(0).filtersConfiguration().includedEventTypes().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-17T03:58:19Z"), model.value().get(0).expirationTimeUtc()); - Assertions.assertEquals("hgbijt", model.nextLink()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteMockTests.java deleted file mode 100644 index 95dd6dd66eb3..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SystemTopicEventSubscriptionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.systemTopicEventSubscriptions().delete("kp", "qwuntob", "izazz", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java deleted file mode 100644 index d96ca532d7c5..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeListResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SystemTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests { - @Test - public void testGetDeliveryAttributesWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ich\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"sysmvxodgw\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeliveryAttributeListResult response = manager.systemTopicEventSubscriptions() - .getDeliveryAttributesWithResponse("bf", "uscstunmlh", "dfb", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ich", response.value().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java deleted file mode 100644 index b90cfe137a23..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SystemTopicEventSubscriptionsGetFullUrlWithResponseMockTests { - @Test - public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"abalfdxaglz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EventSubscriptionFullUrl response = manager.systemTopicEventSubscriptions() - .getFullUrlWithResponse("lw", "vydjufbnk", "blaxpegj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("abalfdxaglz", response.endpointUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicInnerTests.java deleted file mode 100644 index 12fa07217274..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicInnerTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.SystemTopicInner; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SystemTopicInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemTopicInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"source\":\"ci\",\"topicType\":\"defxrdc\",\"metricResourceId\":\"nbkkjanurnnq\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"zxqltgrdogypx\",\"tenantId\":\"vbfihwuhvctafsr\",\"userAssignedIdentities\":{\"agwwrxaom\":{\"principalId\":\"lmliowxihspnxwqa\",\"clientId\":\"epzwaklsbsbqq\"},\"jadhqoawj\":{\"principalId\":\"sgl\",\"clientId\":\"czezkhhlt\"}}},\"location\":\"oyueayfbpcmsp\",\"tags\":{\"mbscbbx\":\"rrueqthwmg\",\"d\":\"gdhxi\"},\"id\":\"opedbwdpyqyybxub\",\"name\":\"dnafcbqwre\",\"type\":\"jelaqacigele\"}") - .toObject(SystemTopicInner.class); - Assertions.assertEquals("oyueayfbpcmsp", model.location()); - Assertions.assertEquals("rrueqthwmg", model.tags().get("mbscbbx")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("zxqltgrdogypx", model.identity().principalId()); - Assertions.assertEquals("vbfihwuhvctafsr", model.identity().tenantId()); - Assertions.assertEquals("lmliowxihspnxwqa", - model.identity().userAssignedIdentities().get("agwwrxaom").principalId()); - Assertions.assertEquals("epzwaklsbsbqq", model.identity().userAssignedIdentities().get("agwwrxaom").clientId()); - Assertions.assertEquals("ci", model.source()); - Assertions.assertEquals("defxrdc", model.topicType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemTopicInner model = new SystemTopicInner().withLocation("oyueayfbpcmsp") - .withTags(mapOf("mbscbbx", "rrueqthwmg", "d", "gdhxi")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("zxqltgrdogypx") - .withTenantId("vbfihwuhvctafsr") - .withUserAssignedIdentities(mapOf("agwwrxaom", - new UserIdentityProperties().withPrincipalId("lmliowxihspnxwqa").withClientId("epzwaklsbsbqq"), - "jadhqoawj", new UserIdentityProperties().withPrincipalId("sgl").withClientId("czezkhhlt")))) - .withSource("ci") - .withTopicType("defxrdc"); - model = BinaryData.fromObject(model).toObject(SystemTopicInner.class); - Assertions.assertEquals("oyueayfbpcmsp", model.location()); - Assertions.assertEquals("rrueqthwmg", model.tags().get("mbscbbx")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("zxqltgrdogypx", model.identity().principalId()); - Assertions.assertEquals("vbfihwuhvctafsr", model.identity().tenantId()); - Assertions.assertEquals("lmliowxihspnxwqa", - model.identity().userAssignedIdentities().get("agwwrxaom").principalId()); - Assertions.assertEquals("epzwaklsbsbqq", model.identity().userAssignedIdentities().get("agwwrxaom").clientId()); - Assertions.assertEquals("ci", model.source()); - Assertions.assertEquals("defxrdc", model.topicType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicPropertiesTests.java deleted file mode 100644 index e1a68a62b511..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.SystemTopicProperties; -import org.junit.jupiter.api.Assertions; - -public final class SystemTopicPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemTopicProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Updating\",\"source\":\"vqvwzkjopwbe\",\"topicType\":\"r\",\"metricResourceId\":\"wzdqybxceakxcpts\"}") - .toObject(SystemTopicProperties.class); - Assertions.assertEquals("vqvwzkjopwbe", model.source()); - Assertions.assertEquals("r", model.topicType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemTopicProperties model = new SystemTopicProperties().withSource("vqvwzkjopwbe").withTopicType("r"); - model = BinaryData.fromObject(model).toObject(SystemTopicProperties.class); - Assertions.assertEquals("vqvwzkjopwbe", model.source()); - Assertions.assertEquals("r", model.topicType()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicUpdateParametersTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicUpdateParametersTests.java deleted file mode 100644 index 3f265fbc3d58..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicUpdateParametersTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.SystemTopicUpdateParameters; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SystemTopicUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemTopicUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"sg\":\"yiaseqchkrttzraz\",\"nbwzohmnrxxbso\":\"kiuemv\",\"gnzxojpslsvj\":\"klinhmdptysprq\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"fiqwoy\",\"tenantId\":\"vapcoh\",\"userAssignedIdentities\":{\"cawetzqddt\":{\"principalId\":\"qpqojxcxzrzd\",\"clientId\":\"dzbenri\"},\"mizvgbgatzuuvbx\":{\"principalId\":\"fljhznamtua\",\"clientId\":\"zwcjjncqtj\"},\"lx\":{\"principalId\":\"rebwggahtt\",\"clientId\":\"swvajqfu\"},\"ryxameblydyvkfkm\":{\"principalId\":\"qzasunwqrjzfrgqh\",\"clientId\":\"hcmbuocnjrohmbp\"}}}}") - .toObject(SystemTopicUpdateParameters.class); - Assertions.assertEquals("yiaseqchkrttzraz", model.tags().get("sg")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("fiqwoy", model.identity().principalId()); - Assertions.assertEquals("vapcoh", model.identity().tenantId()); - Assertions.assertEquals("qpqojxcxzrzd", - model.identity().userAssignedIdentities().get("cawetzqddt").principalId()); - Assertions.assertEquals("dzbenri", model.identity().userAssignedIdentities().get("cawetzqddt").clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemTopicUpdateParameters model = new SystemTopicUpdateParameters() - .withTags(mapOf("sg", "yiaseqchkrttzraz", "nbwzohmnrxxbso", "kiuemv", "gnzxojpslsvj", "klinhmdptysprq")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("fiqwoy") - .withTenantId("vapcoh") - .withUserAssignedIdentities(mapOf("cawetzqddt", - new UserIdentityProperties().withPrincipalId("qpqojxcxzrzd").withClientId("dzbenri"), - "mizvgbgatzuuvbx", - new UserIdentityProperties().withPrincipalId("fljhznamtua").withClientId("zwcjjncqtj"), "lx", - new UserIdentityProperties().withPrincipalId("rebwggahtt").withClientId("swvajqfu"), - "ryxameblydyvkfkm", - new UserIdentityProperties().withPrincipalId("qzasunwqrjzfrgqh").withClientId("hcmbuocnjrohmbp")))); - model = BinaryData.fromObject(model).toObject(SystemTopicUpdateParameters.class); - Assertions.assertEquals("yiaseqchkrttzraz", model.tags().get("sg")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("fiqwoy", model.identity().principalId()); - Assertions.assertEquals("vapcoh", model.identity().tenantId()); - Assertions.assertEquals("qpqojxcxzrzd", - model.identity().userAssignedIdentities().get("cawetzqddt").principalId()); - Assertions.assertEquals("dzbenri", model.identity().userAssignedIdentities().get("cawetzqddt").clientId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateMockTests.java deleted file mode 100644 index d5a26b95961b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.SystemTopic; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SystemTopicsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"source\":\"mtsjkyj\",\"topicType\":\"xwdonbexftedau\",\"metricResourceId\":\"eeggzgrn\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"uumrt\",\"tenantId\":\"qgacantnsyxzxjmk\",\"userAssignedIdentities\":{\"nydscdkx\":{\"principalId\":\"lazof\",\"clientId\":\"xvtemaspm\"}}},\"location\":\"dpwjcbhaahntof\",\"tags\":{\"vsujybsrwz\":\"hpfixoskkzdf\"},\"id\":\"mr\",\"name\":\"t\",\"type\":\"dhmfppinm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SystemTopic response = manager.systemTopics() - .define("bepgcmahiwfry") - .withRegion("atmdmn") - .withExistingResourceGroup("gyweo") - .withTags(mapOf("dmiplois", "nxoirxy", "ntwgkvyo", "kzsoxz", "zwwy", "psapzu")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("gbggcjx") - .withTenantId("blivw") - .withUserAssignedIdentities(mapOf("gxzduvxdmxe", - new UserIdentityProperties().withPrincipalId("dymy").withClientId("hdosmbngkq")))) - .withSource("kapitskshfyftt") - .withTopicType("j") - .create(); - - Assertions.assertEquals("dpwjcbhaahntof", response.location()); - Assertions.assertEquals("hpfixoskkzdf", response.tags().get("vsujybsrwz")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("uumrt", response.identity().principalId()); - Assertions.assertEquals("qgacantnsyxzxjmk", response.identity().tenantId()); - Assertions.assertEquals("lazof", response.identity().userAssignedIdentities().get("nydscdkx").principalId()); - Assertions.assertEquals("xvtemaspm", response.identity().userAssignedIdentities().get("nydscdkx").clientId()); - Assertions.assertEquals("mtsjkyj", response.source()); - Assertions.assertEquals("xwdonbexftedau", response.topicType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteMockTests.java deleted file mode 100644 index e36dd8a6b8db..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SystemTopicsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.systemTopics().delete("n", "detawevxehue", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 37db1d517f70..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.SystemTopic; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SystemTopicsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"source\":\"eswyhh\",\"topicType\":\"fjuajxwwvcmmpe\",\"metricResourceId\":\"y\"},\"identity\":{\"type\":\"None\",\"principalId\":\"aexbzbqufpnez\",\"tenantId\":\"zaymld\",\"userAssignedIdentities\":{\"gi\":{\"principalId\":\"yogzmsimehtcu\",\"clientId\":\"dhtqqhyhnimxtns\"}}},\"location\":\"nomwnwnghojovke\",\"tags\":{\"ixxfsfpcr\":\"ic\",\"jt\":\"nuguefxx\",\"lmcnwepfgsv\":\"bdveywetkrhl\"},\"id\":\"bv\",\"name\":\"qdljnpe\",\"type\":\"l\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SystemTopic response = manager.systemTopics() - .getByResourceGroupWithResponse("bpemnrrabovr", "wxywpjhspboxhif", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nomwnwnghojovke", response.location()); - Assertions.assertEquals("ic", response.tags().get("ixxfsfpcr")); - Assertions.assertEquals(IdentityType.NONE, response.identity().type()); - Assertions.assertEquals("aexbzbqufpnez", response.identity().principalId()); - Assertions.assertEquals("zaymld", response.identity().tenantId()); - Assertions.assertEquals("yogzmsimehtcu", response.identity().userAssignedIdentities().get("gi").principalId()); - Assertions.assertEquals("dhtqqhyhnimxtns", response.identity().userAssignedIdentities().get("gi").clientId()); - Assertions.assertEquals("eswyhh", response.source()); - Assertions.assertEquals("fjuajxwwvcmmpe", response.topicType()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupMockTests.java deleted file mode 100644 index f5d7a1a3a835..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupMockTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.SystemTopic; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SystemTopicsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"source\":\"afnbfbqve\",\"topicType\":\"nxhgk\",\"metricResourceId\":\"dwzejp\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"mbpwdludayp\",\"tenantId\":\"didwmtffbvtzldzc\",\"userAssignedIdentities\":{\"ghfrbzakpjtcq\":{\"principalId\":\"gwn\",\"clientId\":\"uvigv\"},\"jgsatky\":{\"principalId\":\"qpojpsucmximc\",\"clientId\":\"xyn\"}}},\"location\":\"scbgngc\",\"tags\":{\"gcvsvkkjbjolpy\":\"xhirc\",\"lieo\":\"klkvuznadvh\",\"yioqe\":\"gowxxbhtp\"},\"id\":\"qwtqszzgyksik\",\"name\":\"wanvmwdvgjqcrbko\",\"type\":\"pnbn\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.systemTopics() - .listByResourceGroup("ccpumddhgajkr", "yddt", 1302842639, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("scbgngc", response.iterator().next().location()); - Assertions.assertEquals("xhirc", response.iterator().next().tags().get("gcvsvkkjbjolpy")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("mbpwdludayp", response.iterator().next().identity().principalId()); - Assertions.assertEquals("didwmtffbvtzldzc", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("gwn", - response.iterator().next().identity().userAssignedIdentities().get("ghfrbzakpjtcq").principalId()); - Assertions.assertEquals("uvigv", - response.iterator().next().identity().userAssignedIdentities().get("ghfrbzakpjtcq").clientId()); - Assertions.assertEquals("afnbfbqve", response.iterator().next().source()); - Assertions.assertEquals("nxhgk", response.iterator().next().topicType()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListMockTests.java deleted file mode 100644 index caabf0623a8d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListMockTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.SystemTopic; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SystemTopicsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"source\":\"qccddcbny\",\"topicType\":\"jccxwbp\",\"metricResourceId\":\"ykdigqzlrznda\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"jqmvytgkiq\",\"tenantId\":\"rhqtwvcazekdzd\",\"userAssignedIdentities\":{\"gfrrkdknczgoryw\":{\"principalId\":\"jwztsmpchggry\",\"clientId\":\"gfyatig\"}}},\"location\":\"vojtvmdevdlhqv\",\"tags\":{\"kpkpkocmacc\":\"rbpyhssrl\"},\"id\":\"bxxo\",\"name\":\"yicyvspeslhwy\",\"type\":\"kgv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.systemTopics().list("dxljzvdovbrble", 2092784834, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vojtvmdevdlhqv", response.iterator().next().location()); - Assertions.assertEquals("rbpyhssrl", response.iterator().next().tags().get("kpkpkocmacc")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("jqmvytgkiq", response.iterator().next().identity().principalId()); - Assertions.assertEquals("rhqtwvcazekdzd", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("jwztsmpchggry", - response.iterator().next().identity().userAssignedIdentities().get("gfrrkdknczgoryw").principalId()); - Assertions.assertEquals("gfyatig", - response.iterator().next().identity().userAssignedIdentities().get("gfrrkdknczgoryw").clientId()); - Assertions.assertEquals("qccddcbny", response.iterator().next().source()); - Assertions.assertEquals("jccxwbp", response.iterator().next().topicType()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListResultTests.java deleted file mode 100644 index d850dea32000..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListResultTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.SystemTopicInner; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.SystemTopicsListResult; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SystemTopicsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemTopicsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"source\":\"v\",\"topicType\":\"tod\",\"metricResourceId\":\"pyapucygvoav\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"lghieegjlgvvpase\",\"tenantId\":\"gbuxantuygdh\",\"userAssignedIdentities\":{\"mjnlexwhcb\":{\"principalId\":\"pirpiwrqof\",\"clientId\":\"o\"},\"toyint\":{\"principalId\":\"ibkeph\",\"clientId\":\"uerct\"}}},\"location\":\"pbrlcyrduczkgofx\",\"tags\":{\"vjeaqnrmvvfkoxml\":\"rucvcrrpcjttbs\",\"lpdwwexymzvlazi\":\"hktuidvrma\",\"uzivensrpmeyyvp\":\"bhpwvqsgnyy\",\"gsksrfhf\":\"patlbijp\"},\"id\":\"olmk\",\"name\":\"bnxwc\",\"type\":\"ommpvfqaw\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"source\":\"ttuiaclkiexhajl\",\"topicType\":\"t\",\"metricResourceId\":\"qfyuttd\"},\"identity\":{\"type\":\"None\",\"principalId\":\"n\",\"tenantId\":\"wmtxkyctwwgz\",\"userAssignedIdentities\":{\"moqqtlffhzbk\":{\"principalId\":\"mecvogygzyvneeza\",\"clientId\":\"gh\"},\"idbz\":{\"principalId\":\"jjjavfqnvhnq\",\"clientId\":\"wdogiyetesyp\"}}},\"location\":\"jhqt\",\"tags\":{\"etnjuhpsprkz\":\"vnynkb\",\"cxnafbwqrooh\":\"aupia\",\"mghihp\":\"uovmaonurjt\",\"jxl\":\"ecmslclbl\"},\"id\":\"bsjuscvsfx\",\"name\":\"gctmgxuupbezq\",\"type\":\"cydrtceukdqkk\"}],\"nextLink\":\"hztgeqmgqzgwld\"}") - .toObject(SystemTopicsListResult.class); - Assertions.assertEquals("pbrlcyrduczkgofx", model.value().get(0).location()); - Assertions.assertEquals("rucvcrrpcjttbs", model.value().get(0).tags().get("vjeaqnrmvvfkoxml")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("lghieegjlgvvpase", model.value().get(0).identity().principalId()); - Assertions.assertEquals("gbuxantuygdh", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("pirpiwrqof", - model.value().get(0).identity().userAssignedIdentities().get("mjnlexwhcb").principalId()); - Assertions.assertEquals("o", - model.value().get(0).identity().userAssignedIdentities().get("mjnlexwhcb").clientId()); - Assertions.assertEquals("v", model.value().get(0).source()); - Assertions.assertEquals("tod", model.value().get(0).topicType()); - Assertions.assertEquals("hztgeqmgqzgwld", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemTopicsListResult model = new SystemTopicsListResult().withValue(Arrays.asList( - new SystemTopicInner().withLocation("pbrlcyrduczkgofx") - .withTags(mapOf("vjeaqnrmvvfkoxml", "rucvcrrpcjttbs", "lpdwwexymzvlazi", "hktuidvrma", - "uzivensrpmeyyvp", "bhpwvqsgnyy", "gsksrfhf", "patlbijp")) - .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("lghieegjlgvvpase") - .withTenantId("gbuxantuygdh") - .withUserAssignedIdentities(mapOf("mjnlexwhcb", - new UserIdentityProperties().withPrincipalId("pirpiwrqof").withClientId("o"), "toyint", - new UserIdentityProperties().withPrincipalId("ibkeph").withClientId("uerct")))) - .withSource("v") - .withTopicType("tod"), - new SystemTopicInner().withLocation("jhqt") - .withTags(mapOf("etnjuhpsprkz", "vnynkb", "cxnafbwqrooh", "aupia", "mghihp", "uovmaonurjt", "jxl", - "ecmslclbl")) - .withIdentity(new IdentityInfo().withType(IdentityType.NONE) - .withPrincipalId("n") - .withTenantId("wmtxkyctwwgz") - .withUserAssignedIdentities(mapOf("moqqtlffhzbk", - new UserIdentityProperties().withPrincipalId("mecvogygzyvneeza").withClientId("gh"), "idbz", - new UserIdentityProperties().withPrincipalId("jjjavfqnvhnq").withClientId("wdogiyetesyp")))) - .withSource("ttuiaclkiexhajl") - .withTopicType("t"))) - .withNextLink("hztgeqmgqzgwld"); - model = BinaryData.fromObject(model).toObject(SystemTopicsListResult.class); - Assertions.assertEquals("pbrlcyrduczkgofx", model.value().get(0).location()); - Assertions.assertEquals("rucvcrrpcjttbs", model.value().get(0).tags().get("vjeaqnrmvvfkoxml")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("lghieegjlgvvpase", model.value().get(0).identity().principalId()); - Assertions.assertEquals("gbuxantuygdh", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("pirpiwrqof", - model.value().get(0).identity().userAssignedIdentities().get("mjnlexwhcb").principalId()); - Assertions.assertEquals("o", - model.value().get(0).identity().userAssignedIdentities().get("mjnlexwhcb").clientId()); - Assertions.assertEquals("v", model.value().get(0).source()); - Assertions.assertEquals("tod", model.value().get(0).topicType()); - Assertions.assertEquals("hztgeqmgqzgwld", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteMockTests.java deleted file mode 100644 index c6458b3e6eda..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicEventSubscriptionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.topicEventSubscriptions() - .delete("vdpwwobtdphti", "sffofwanmhksca", "w", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java deleted file mode 100644 index a685a1172d61..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeListResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests { - @Test - public void testGetDeliveryAttributesWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"emtm\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"rf\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"pinkzp\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"qtdiswxspvckoj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeliveryAttributeListResult response = manager.topicEventSubscriptions() - .getDeliveryAttributesWithResponse("zfkiceevsaaxwsp", "axikhfjqebglcxk", "gzzromv", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("emtm", response.value().get(0).name()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlWithResponseMockTests.java deleted file mode 100644 index 451737d208fe..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicEventSubscriptionsGetFullUrlWithResponseMockTests { - @Test - public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"wewqkj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EventSubscriptionFullUrl response = manager.topicEventSubscriptions() - .getFullUrlWithResponse("zcgwdfriw", "ybjpozoks", "vgllixdgby", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wewqkj", response.endpointUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicInnerTests.java deleted file mode 100644 index 6828113a657b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicInnerTests.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.TopicInner; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceKind; -import com.azure.resourcemanager.eventgrid.models.ResourceSku; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TopicInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"cecfehuwaoaguh\"},\"groupIds\":[\"llizs\",\"ac\",\"jvhrweft\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"pmvssehaep\",\"actionsRequired\":\"mcxtczhu\"},\"provisioningState\":\"Deleting\"},\"id\":\"knijduyyes\",\"name\":\"ydjfb\",\"type\":\"c\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ulrtywikdmh\"},\"groupIds\":[\"uflgbhgauacdixm\",\"ufr\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"gdkfnoz\",\"actionsRequired\":\"oqbvjhvefgwbmqj\"},\"provisioningState\":\"Updating\"},\"id\":\"tasfaymxbulpzeal\",\"name\":\"mqkyojwyvfkmbts\",\"type\":\"ahxsgxjcmm\"}],\"provisioningState\":\"Failed\",\"endpoint\":\"cubiwsdr\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"vevboclzh\":{\"description\":\"iffjxcjrm\",\"displayName\":\"abwibvjogjo\",\"documentationUrl\":\"cyefoyzbamwine\",\"dataSchemaUrl\":\"vfkakpold\"},\"blcouqehbhbcdszi\":{\"description\":\"knyuxgvttxpn\",\"displayName\":\"pzaamrdixtreki\",\"documentationUrl\":\"wyskbruffgll\",\"dataSchemaUrl\":\"kutvlxhrpqhv\"},\"hmrnadzyqegxy\":{\"description\":\"randoypmb\",\"displayName\":\"oormkfqlwxldyka\",\"documentationUrl\":\"ygaolnjpnnb\",\"dataSchemaUrl\":\"ksibjgsjjxx\"},\"ka\":{\"description\":\"pinbmhwbjijkgqxn\",\"displayName\":\"bkezn\",\"documentationUrl\":\"ujvaannggi\",\"dataSchemaUrl\":\"wkdtaawxwf\"}}},\"minimumTlsVersionAllowed\":\"1.0\",\"inputSchema\":\"CustomEventSchema\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"zmqkratbnxwbjs\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"fpksok\",\"action\":\"Allow\"},{\"ipMask\":\"ewijymrhbguz\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"o\",\"tenantId\":\"ffjkutycyarnroo\",\"userAssignedIdentities\":{\"pyc\":{\"principalId\":\"bzog\",\"clientId\":\"t\"},\"zptwrlohap\":{\"principalId\":\"coe\",\"clientId\":\"nhzqrottjzcfy\"},\"xpjb\":{\"principalId\":\"nfszpyglqdhmrjz\",\"clientId\":\"l\"}}},\"kind\":\"AzureArc\",\"extendedLocation\":{\"name\":\"o\",\"type\":\"jenkyh\"},\"location\":\"zv\",\"tags\":{\"mpzqjhhhq\":\"fxjelg\",\"bsizus\":\"uwyvcacoyvi\",\"lzijiufehgmvflnw\":\"szlbscm\",\"kxrerlniylylyfwx\":\"v\"},\"id\":\"utgqztwh\",\"name\":\"hmupgxyjtcdxabbu\",\"type\":\"ftabenbbklqp\"}") - .toObject(TopicInner.class); - Assertions.assertEquals("zv", model.location()); - Assertions.assertEquals("fxjelg", model.tags().get("mpzqjhhhq")); - Assertions.assertEquals(Sku.BASIC, model.sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("o", model.identity().principalId()); - Assertions.assertEquals("ffjkutycyarnroo", model.identity().tenantId()); - Assertions.assertEquals("bzog", model.identity().userAssignedIdentities().get("pyc").principalId()); - Assertions.assertEquals("t", model.identity().userAssignedIdentities().get("pyc").clientId()); - Assertions.assertEquals(ResourceKind.AZURE_ARC, model.kind()); - Assertions.assertEquals("o", model.extendedLocation().name()); - Assertions.assertEquals("jenkyh", model.extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("iffjxcjrm", model.eventTypeInfo().inlineEventTypes().get("vevboclzh").description()); - Assertions.assertEquals("abwibvjogjo", model.eventTypeInfo().inlineEventTypes().get("vevboclzh").displayName()); - Assertions.assertEquals("cyefoyzbamwine", - model.eventTypeInfo().inlineEventTypes().get("vevboclzh").documentationUrl()); - Assertions.assertEquals("vfkakpold", model.eventTypeInfo().inlineEventTypes().get("vevboclzh").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CUSTOM_EVENT_SCHEMA, model.inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("fpksok", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicInner model - = new TopicInner().withLocation("zv") - .withTags(mapOf("mpzqjhhhq", "fxjelg", "bsizus", "uwyvcacoyvi", "lzijiufehgmvflnw", "szlbscm", - "kxrerlniylylyfwx", "v")) - .withSku(new ResourceSku().withName(Sku.BASIC)) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("o") - .withTenantId("ffjkutycyarnroo") - .withUserAssignedIdentities(mapOf("pyc", - new UserIdentityProperties().withPrincipalId("bzog").withClientId("t"), "zptwrlohap", - new UserIdentityProperties().withPrincipalId("coe").withClientId("nhzqrottjzcfy"), "xpjb", - new UserIdentityProperties().withPrincipalId("nfszpyglqdhmrjz").withClientId("l")))) - .withKind(ResourceKind.AZURE_ARC) - .withExtendedLocation(new ExtendedLocation().withName("o").withType("jenkyh")) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("vevboclzh", - new InlineEventProperties().withDescription("iffjxcjrm") - .withDisplayName("abwibvjogjo") - .withDocumentationUrl("cyefoyzbamwine") - .withDataSchemaUrl("vfkakpold"), - "blcouqehbhbcdszi", - new InlineEventProperties().withDescription("knyuxgvttxpn") - .withDisplayName("pzaamrdixtreki") - .withDocumentationUrl("wyskbruffgll") - .withDataSchemaUrl("kutvlxhrpqhv"), - "hmrnadzyqegxy", - new InlineEventProperties().withDescription("randoypmb") - .withDisplayName("oormkfqlwxldyka") - .withDocumentationUrl("ygaolnjpnnb") - .withDataSchemaUrl("ksibjgsjjxx"), - "ka", - new InlineEventProperties().withDescription("pinbmhwbjijkgqxn") - .withDisplayName("bkezn") - .withDocumentationUrl("ujvaannggi") - .withDataSchemaUrl("wkdtaawxwf")))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withInputSchema(InputSchema.CUSTOM_EVENT_SCHEMA) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("fpksok").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("ewijymrhbguz").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR); - model = BinaryData.fromObject(model).toObject(TopicInner.class); - Assertions.assertEquals("zv", model.location()); - Assertions.assertEquals("fxjelg", model.tags().get("mpzqjhhhq")); - Assertions.assertEquals(Sku.BASIC, model.sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("o", model.identity().principalId()); - Assertions.assertEquals("ffjkutycyarnroo", model.identity().tenantId()); - Assertions.assertEquals("bzog", model.identity().userAssignedIdentities().get("pyc").principalId()); - Assertions.assertEquals("t", model.identity().userAssignedIdentities().get("pyc").clientId()); - Assertions.assertEquals(ResourceKind.AZURE_ARC, model.kind()); - Assertions.assertEquals("o", model.extendedLocation().name()); - Assertions.assertEquals("jenkyh", model.extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("iffjxcjrm", model.eventTypeInfo().inlineEventTypes().get("vevboclzh").description()); - Assertions.assertEquals("abwibvjogjo", model.eventTypeInfo().inlineEventTypes().get("vevboclzh").displayName()); - Assertions.assertEquals("cyefoyzbamwine", - model.eventTypeInfo().inlineEventTypes().get("vevboclzh").documentationUrl()); - Assertions.assertEquals("vfkakpold", model.eventTypeInfo().inlineEventTypes().get("vevboclzh").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CUSTOM_EVENT_SCHEMA, model.inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("fpksok", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicPropertiesTests.java deleted file mode 100644 index 6a1c74f21e4c..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicPropertiesTests.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.TopicProperties; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TopicPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicProperties model = BinaryData.fromString( - "{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"e\"},\"groupIds\":[\"wnlzafwxu\",\"gnhgook\",\"talvnbwgp\",\"emeluclv\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"yrdnqod\",\"actionsRequired\":\"hhxhq\"},\"provisioningState\":\"Creating\"},\"id\":\"nvzoqgyipemch\",\"name\":\"avsczuejdtxp\",\"type\":\"lghwzhome\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"tl\"},\"groupIds\":[\"qawmoaianc\",\"nvodrrs\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"dkxrxvvbxi\",\"actionsRequired\":\"g\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ljnqkhychoco\",\"name\":\"ulehurqlr\",\"type\":\"ffaweyur\"}],\"provisioningState\":\"Failed\",\"endpoint\":\"jdxravjuqdbrx\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"jy\":{\"description\":\"pxkiyf\",\"displayName\":\"kbajbu\",\"documentationUrl\":\"gd\",\"dataSchemaUrl\":\"sioycblevpmcl\"},\"owftptnuwjtks\":{\"description\":\"yxlzgs\",\"displayName\":\"kzzltafhbzf\",\"documentationUrl\":\"vwmbjlzqsczpg\",\"dataSchemaUrl\":\"wnapfdq\"},\"spkxkdt\":{\"description\":\"gcgqyhleseyqrhvy\",\"displayName\":\"dotjvdk\",\"documentationUrl\":\"swskuk\",\"dataSchemaUrl\":\"asbvw\"}}},\"minimumTlsVersionAllowed\":\"1.1\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"vtwknvgmmbugt\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"aqkue\",\"action\":\"Allow\"},{\"ipMask\":\"oeshoygzcbyfq\",\"action\":\"Allow\"},{\"ipMask\":\"oytehqpuvjm\",\"action\":\"Allow\"},{\"ipMask\":\"dwckygroe\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"dataResidencyBoundary\":\"WithinGeopair\"}") - .toObject(TopicProperties.class); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("pxkiyf", model.eventTypeInfo().inlineEventTypes().get("jy").description()); - Assertions.assertEquals("kbajbu", model.eventTypeInfo().inlineEventTypes().get("jy").displayName()); - Assertions.assertEquals("gd", model.eventTypeInfo().inlineEventTypes().get("jy").documentationUrl()); - Assertions.assertEquals("sioycblevpmcl", model.eventTypeInfo().inlineEventTypes().get("jy").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("aqkue", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicProperties model = new TopicProperties() - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("jy", - new InlineEventProperties().withDescription("pxkiyf") - .withDisplayName("kbajbu") - .withDocumentationUrl("gd") - .withDataSchemaUrl("sioycblevpmcl"), - "owftptnuwjtks", - new InlineEventProperties().withDescription("yxlzgs") - .withDisplayName("kzzltafhbzf") - .withDocumentationUrl("vwmbjlzqsczpg") - .withDataSchemaUrl("wnapfdq"), - "spkxkdt", - new InlineEventProperties().withDescription("gcgqyhleseyqrhvy") - .withDisplayName("dotjvdk") - .withDocumentationUrl("swskuk") - .withDataSchemaUrl("asbvw")))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) - .withInputSchema(InputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("aqkue").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("oeshoygzcbyfq").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("oytehqpuvjm").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("dwckygroe").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR); - model = BinaryData.fromObject(model).toObject(TopicProperties.class); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("pxkiyf", model.eventTypeInfo().inlineEventTypes().get("jy").description()); - Assertions.assertEquals("kbajbu", model.eventTypeInfo().inlineEventTypes().get("jy").displayName()); - Assertions.assertEquals("gd", model.eventTypeInfo().inlineEventTypes().get("jy").documentationUrl()); - Assertions.assertEquals("sioycblevpmcl", model.eventTypeInfo().inlineEventTypes().get("jy").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("aqkue", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpaceInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpaceInnerTests.java deleted file mode 100644 index e607195f5bb1..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpaceInnerTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TopicSpaceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicSpaceInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"jy\",\"topicTemplates\":[\"swbqerzwxi\",\"txtd\",\"ukvlb\"],\"provisioningState\":\"Creating\"},\"id\":\"dstyouam\",\"name\":\"ewres\",\"type\":\"moweg\"}") - .toObject(TopicSpaceInner.class); - Assertions.assertEquals("jy", model.description()); - Assertions.assertEquals("swbqerzwxi", model.topicTemplates().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicSpaceInner model = new TopicSpaceInner().withDescription("jy") - .withTopicTemplates(Arrays.asList("swbqerzwxi", "txtd", "ukvlb")); - model = BinaryData.fromObject(model).toObject(TopicSpaceInner.class); - Assertions.assertEquals("jy", model.description()); - Assertions.assertEquals("swbqerzwxi", model.topicTemplates().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacePropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacePropertiesTests.java deleted file mode 100644 index 136c6a6a1a1e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacePropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TopicSpacePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicSpaceProperties model = BinaryData.fromString( - "{\"description\":\"uteyxeyguq\",\"topicTemplates\":[\"jiitnspxlzdesygr\",\"jwaiuf\"],\"provisioningState\":\"Updating\"}") - .toObject(TopicSpaceProperties.class); - Assertions.assertEquals("uteyxeyguq", model.description()); - Assertions.assertEquals("jiitnspxlzdesygr", model.topicTemplates().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicSpaceProperties model = new TopicSpaceProperties().withDescription("uteyxeyguq") - .withTopicTemplates(Arrays.asList("jiitnspxlzdesygr", "jwaiuf")); - model = BinaryData.fromObject(model).toObject(TopicSpaceProperties.class); - Assertions.assertEquals("uteyxeyguq", model.description()); - Assertions.assertEquals("jiitnspxlzdesygr", model.topicTemplates().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesCreateOrUpdateMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesCreateOrUpdateMockTests.java deleted file mode 100644 index b3fa7daffc8b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.TopicSpace; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicSpacesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"description\":\"d\",\"topicTemplates\":[\"bqaolgzubakdlkv\"],\"provisioningState\":\"Succeeded\"},\"id\":\"fnsffetpkmixwew\",\"name\":\"lscgsmepnq\",\"type\":\"xgvohdbthhxmoe\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - TopicSpace response = manager.topicSpaces() - .define("bqk") - .withExistingNamespace("xqlyoazyfbkmvl", "zmxojzsvmai") - .withDescription("ejthgeecbpergwlc") - .withTopicTemplates(Arrays.asList("bamyqsokkn", "ug", "jwdizcrjixiujz")) - .create(); - - Assertions.assertEquals("d", response.description()); - Assertions.assertEquals("bqaolgzubakdlkv", response.topicTemplates().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesDeleteMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesDeleteMockTests.java deleted file mode 100644 index b44697e7826a..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicSpacesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.topicSpaces().delete("jywiwhvyc", "jncindiloqkajw", "uriarsbcl", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesGetWithResponseMockTests.java deleted file mode 100644 index 35f18d1d8662..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.TopicSpace; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicSpacesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"description\":\"wqxungrobgwfms\",\"topicTemplates\":[\"dylwx\",\"vzjowzug\",\"erclblt\",\"hpwachyeu\"],\"provisioningState\":\"Canceled\"},\"id\":\"vwryvd\",\"name\":\"fkiikgpruccwm\",\"type\":\"cbtxsytrtexegwmr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - TopicSpace response = manager.topicSpaces() - .getWithResponse("jiznioroofmftas", "mcreihu", "trnighm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wqxungrobgwfms", response.description()); - Assertions.assertEquals("dylwx", response.topicTemplates().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListByNamespaceMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListByNamespaceMockTests.java deleted file mode 100644 index 0d25d7087933..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListByNamespaceMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.TopicSpace; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicSpacesListByNamespaceMockTests { - @Test - public void testListByNamespace() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"xwacyyjmlxp\",\"topicTemplates\":[\"dzkf\",\"vuiiu\",\"ibfkcjytq\"],\"provisioningState\":\"Deleting\"},\"id\":\"eqqfop\",\"name\":\"nopm\",\"type\":\"tdsfh\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.topicSpaces() - .listByNamespace("anhz", "knjxizbaxdy", "zkz", 1973773763, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xwacyyjmlxp", response.iterator().next().description()); - Assertions.assertEquals("dzkf", response.iterator().next().topicTemplates().get(0)); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListResultTests.java deleted file mode 100644 index 37cdd045a280..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListResultTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceInner; -import com.azure.resourcemanager.eventgrid.models.TopicSpacesListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TopicSpacesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicSpacesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"description\":\"ueqfrojsyd\",\"topicTemplates\":[\"ydkygywezskieca\"],\"provisioningState\":\"Canceled\"},\"id\":\"m\",\"name\":\"ieqvds\",\"type\":\"a\"},{\"properties\":{\"description\":\"xq\",\"topicTemplates\":[\"y\",\"xalybxawoijpo\"],\"provisioningState\":\"Canceled\"},\"id\":\"xpkk\",\"name\":\"j\",\"type\":\"jodqhykincn\"},{\"properties\":{\"description\":\"ehllizhceum\",\"topicTemplates\":[\"dkadppyibn\",\"qladywrxwhydtlu\",\"vadswzs\",\"uyem\"],\"provisioningState\":\"Updating\"},\"id\":\"owhl\",\"name\":\"lnwy\",\"type\":\"mouvbl\"},{\"properties\":{\"description\":\"kzkltrfowt\",\"topicTemplates\":[\"fmvlihcvjdrqc\",\"jidhftu\",\"vhdxlwyo\",\"bfqz\"],\"provisioningState\":\"Creating\"},\"id\":\"jyixhaf\",\"name\":\"atqxmbjroumzzn\",\"type\":\"al\"}],\"nextLink\":\"rhuzgfxonjtpu\"}") - .toObject(TopicSpacesListResult.class); - Assertions.assertEquals("ueqfrojsyd", model.value().get(0).description()); - Assertions.assertEquals("ydkygywezskieca", model.value().get(0).topicTemplates().get(0)); - Assertions.assertEquals("rhuzgfxonjtpu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicSpacesListResult model = new TopicSpacesListResult() - .withValue(Arrays.asList( - new TopicSpaceInner().withDescription("ueqfrojsyd") - .withTopicTemplates(Arrays.asList("ydkygywezskieca")), - new TopicSpaceInner().withDescription("xq").withTopicTemplates(Arrays.asList("y", "xalybxawoijpo")), - new TopicSpaceInner().withDescription("ehllizhceum") - .withTopicTemplates(Arrays.asList("dkadppyibn", "qladywrxwhydtlu", "vadswzs", "uyem")), - new TopicSpaceInner().withDescription("kzkltrfowt") - .withTopicTemplates(Arrays.asList("fmvlihcvjdrqc", "jidhftu", "vhdxlwyo", "bfqz")))) - .withNextLink("rhuzgfxonjtpu"); - model = BinaryData.fromObject(model).toObject(TopicSpacesListResult.class); - Assertions.assertEquals("ueqfrojsyd", model.value().get(0).description()); - Assertions.assertEquals("ydkygywezskieca", model.value().get(0).topicTemplates().get(0)); - Assertions.assertEquals("rhuzgfxonjtpu", model.nextLink()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypeAdditionalEnforcedPermissionTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypeAdditionalEnforcedPermissionTests.java deleted file mode 100644 index 47768e31ce8e..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypeAdditionalEnforcedPermissionTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.TopicTypeAdditionalEnforcedPermission; -import org.junit.jupiter.api.Assertions; - -public final class TopicTypeAdditionalEnforcedPermissionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicTypeAdditionalEnforcedPermission model - = BinaryData.fromString("{\"permissionName\":\"wakywalhjymxcgq\",\"isDataAction\":true}") - .toObject(TopicTypeAdditionalEnforcedPermission.class); - Assertions.assertEquals("wakywalhjymxcgq", model.permissionName()); - Assertions.assertEquals(true, model.isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicTypeAdditionalEnforcedPermission model - = new TopicTypeAdditionalEnforcedPermission().withPermissionName("wakywalhjymxcgq").withIsDataAction(true); - model = BinaryData.fromObject(model).toObject(TopicTypeAdditionalEnforcedPermission.class); - Assertions.assertEquals("wakywalhjymxcgq", model.permissionName()); - Assertions.assertEquals(true, model.isDataAction()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypeInfoInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypeInfoInnerTests.java deleted file mode 100644 index 8c3ffbb8c223..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypeInfoInnerTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.TopicTypeInfoInner; -import com.azure.resourcemanager.eventgrid.models.ResourceRegionType; -import com.azure.resourcemanager.eventgrid.models.TopicTypeAdditionalEnforcedPermission; -import com.azure.resourcemanager.eventgrid.models.TopicTypeProvisioningState; -import com.azure.resourcemanager.eventgrid.models.TopicTypeSourceScope; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TopicTypeInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicTypeInfoInner model = BinaryData.fromString( - "{\"properties\":{\"provider\":\"tmmkosz\",\"displayName\":\"blnsntrpcaqk\",\"description\":\"f\",\"resourceRegionType\":\"GlobalResource\",\"provisioningState\":\"Updating\",\"supportedLocations\":[\"lbnld\"],\"sourceResourceFormat\":\"cbhhez\",\"supportedScopesForSource\":[\"ResourceGroup\"],\"areRegionalAndGlobalSourcesSupported\":false,\"additionalEnforcedPermissions\":[{\"permissionName\":\"trpb\",\"isDataAction\":false}]},\"id\":\"yuuatvlmbjwcolbm\",\"name\":\"lbnwtpcpahp\",\"type\":\"z\"}") - .toObject(TopicTypeInfoInner.class); - Assertions.assertEquals("tmmkosz", model.provider()); - Assertions.assertEquals("blnsntrpcaqk", model.displayName()); - Assertions.assertEquals("f", model.description()); - Assertions.assertEquals(ResourceRegionType.GLOBAL_RESOURCE, model.resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.UPDATING, model.provisioningState()); - Assertions.assertEquals("lbnld", model.supportedLocations().get(0)); - Assertions.assertEquals("cbhhez", model.sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.RESOURCE_GROUP, model.supportedScopesForSource().get(0)); - Assertions.assertEquals(false, model.areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("trpb", model.additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertEquals(false, model.additionalEnforcedPermissions().get(0).isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicTypeInfoInner model = new TopicTypeInfoInner().withProvider("tmmkosz") - .withDisplayName("blnsntrpcaqk") - .withDescription("f") - .withResourceRegionType(ResourceRegionType.GLOBAL_RESOURCE) - .withProvisioningState(TopicTypeProvisioningState.UPDATING) - .withSupportedLocations(Arrays.asList("lbnld")) - .withSourceResourceFormat("cbhhez") - .withSupportedScopesForSource(Arrays.asList(TopicTypeSourceScope.RESOURCE_GROUP)) - .withAreRegionalAndGlobalSourcesSupported(false) - .withAdditionalEnforcedPermissions(Arrays.asList( - new TopicTypeAdditionalEnforcedPermission().withPermissionName("trpb").withIsDataAction(false))); - model = BinaryData.fromObject(model).toObject(TopicTypeInfoInner.class); - Assertions.assertEquals("tmmkosz", model.provider()); - Assertions.assertEquals("blnsntrpcaqk", model.displayName()); - Assertions.assertEquals("f", model.description()); - Assertions.assertEquals(ResourceRegionType.GLOBAL_RESOURCE, model.resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.UPDATING, model.provisioningState()); - Assertions.assertEquals("lbnld", model.supportedLocations().get(0)); - Assertions.assertEquals("cbhhez", model.sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.RESOURCE_GROUP, model.supportedScopesForSource().get(0)); - Assertions.assertEquals(false, model.areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("trpb", model.additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertEquals(false, model.additionalEnforcedPermissions().get(0).isDataAction()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypePropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypePropertiesTests.java deleted file mode 100644 index 30e9ed55c2b4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypePropertiesTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.TopicTypeProperties; -import com.azure.resourcemanager.eventgrid.models.ResourceRegionType; -import com.azure.resourcemanager.eventgrid.models.TopicTypeAdditionalEnforcedPermission; -import com.azure.resourcemanager.eventgrid.models.TopicTypeProvisioningState; -import com.azure.resourcemanager.eventgrid.models.TopicTypeSourceScope; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TopicTypePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicTypeProperties model = BinaryData.fromString( - "{\"provider\":\"xhmtfhocnxzc\",\"displayName\":\"hngxnoqrxtd\",\"description\":\"njevhdlmydidw\",\"resourceRegionType\":\"RegionalResource\",\"provisioningState\":\"Succeeded\",\"supportedLocations\":[\"jfdoesxxhm\",\"cdbcky\",\"ikxkxhneg\"],\"sourceResourceFormat\":\"jzrbhtmeplv\",\"supportedScopesForSource\":[\"Resource\",\"ResourceGroup\"],\"areRegionalAndGlobalSourcesSupported\":false,\"additionalEnforcedPermissions\":[{\"permissionName\":\"snbagnchjhg\",\"isDataAction\":false}]}") - .toObject(TopicTypeProperties.class); - Assertions.assertEquals("xhmtfhocnxzc", model.provider()); - Assertions.assertEquals("hngxnoqrxtd", model.displayName()); - Assertions.assertEquals("njevhdlmydidw", model.description()); - Assertions.assertEquals(ResourceRegionType.REGIONAL_RESOURCE, model.resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.SUCCEEDED, model.provisioningState()); - Assertions.assertEquals("jfdoesxxhm", model.supportedLocations().get(0)); - Assertions.assertEquals("jzrbhtmeplv", model.sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.RESOURCE, model.supportedScopesForSource().get(0)); - Assertions.assertEquals(false, model.areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("snbagnchjhg", model.additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertEquals(false, model.additionalEnforcedPermissions().get(0).isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicTypeProperties model = new TopicTypeProperties().withProvider("xhmtfhocnxzc") - .withDisplayName("hngxnoqrxtd") - .withDescription("njevhdlmydidw") - .withResourceRegionType(ResourceRegionType.REGIONAL_RESOURCE) - .withProvisioningState(TopicTypeProvisioningState.SUCCEEDED) - .withSupportedLocations(Arrays.asList("jfdoesxxhm", "cdbcky", "ikxkxhneg")) - .withSourceResourceFormat("jzrbhtmeplv") - .withSupportedScopesForSource( - Arrays.asList(TopicTypeSourceScope.RESOURCE, TopicTypeSourceScope.RESOURCE_GROUP)) - .withAreRegionalAndGlobalSourcesSupported(false) - .withAdditionalEnforcedPermissions(Arrays.asList( - new TopicTypeAdditionalEnforcedPermission().withPermissionName("snbagnchjhg").withIsDataAction(false))); - model = BinaryData.fromObject(model).toObject(TopicTypeProperties.class); - Assertions.assertEquals("xhmtfhocnxzc", model.provider()); - Assertions.assertEquals("hngxnoqrxtd", model.displayName()); - Assertions.assertEquals("njevhdlmydidw", model.description()); - Assertions.assertEquals(ResourceRegionType.REGIONAL_RESOURCE, model.resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.SUCCEEDED, model.provisioningState()); - Assertions.assertEquals("jfdoesxxhm", model.supportedLocations().get(0)); - Assertions.assertEquals("jzrbhtmeplv", model.sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.RESOURCE, model.supportedScopesForSource().get(0)); - Assertions.assertEquals(false, model.areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("snbagnchjhg", model.additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertEquals(false, model.additionalEnforcedPermissions().get(0).isDataAction()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetWithResponseMockTests.java deleted file mode 100644 index ac18d16d6e6f..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetWithResponseMockTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.ResourceRegionType; -import com.azure.resourcemanager.eventgrid.models.TopicTypeInfo; -import com.azure.resourcemanager.eventgrid.models.TopicTypeProvisioningState; -import com.azure.resourcemanager.eventgrid.models.TopicTypeSourceScope; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicTypesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provider\":\"okfekcjjlw\",\"displayName\":\"e\",\"description\":\"hhutpuln\",\"resourceRegionType\":\"RegionalResource\",\"provisioningState\":\"Creating\",\"supportedLocations\":[\"cih\"],\"sourceResourceFormat\":\"nowrerjpx\",\"supportedScopesForSource\":[\"ManagementGroup\",\"AzureSubscription\",\"ResourceGroup\"],\"areRegionalAndGlobalSourcesSupported\":false,\"additionalEnforcedPermissions\":[{\"permissionName\":\"qimlgbbfjmdgj\",\"isDataAction\":false},{\"permissionName\":\"mpmheftyap\",\"isDataAction\":false},{\"permissionName\":\"fytlsnl\",\"isDataAction\":true}]},\"id\":\"cmcqixuan\",\"name\":\"cqvjf\",\"type\":\"gfqpmq\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - TopicTypeInfo response = manager.topicTypes().getWithResponse("f", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("okfekcjjlw", response.provider()); - Assertions.assertEquals("e", response.displayName()); - Assertions.assertEquals("hhutpuln", response.description()); - Assertions.assertEquals(ResourceRegionType.REGIONAL_RESOURCE, response.resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.CREATING, response.provisioningState()); - Assertions.assertEquals("cih", response.supportedLocations().get(0)); - Assertions.assertEquals("nowrerjpx", response.sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.MANAGEMENT_GROUP, response.supportedScopesForSource().get(0)); - Assertions.assertEquals(false, response.areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("qimlgbbfjmdgj", response.additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertEquals(false, response.additionalEnforcedPermissions().get(0).isDataAction()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesMockTests.java deleted file mode 100644 index 530c15c35740..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicTypesListEventTypesMockTests { - @Test - public void testListEventTypes() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"ufzg\",\"description\":\"rblwalao\",\"schemaUrl\":\"nqebaotbptgc\",\"isInDefaultSet\":true},\"id\":\"nxxrwqfmd\",\"name\":\"ecvtamqwzmno\",\"type\":\"fe\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.topicTypes().listEventTypes("xpjhcfaaradci", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ufzg", response.iterator().next().displayName()); - Assertions.assertEquals("rblwalao", response.iterator().next().description()); - Assertions.assertEquals("nqebaotbptgc", response.iterator().next().schemaUrl()); - Assertions.assertEquals(true, response.iterator().next().isInDefaultSet()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListMockTests.java deleted file mode 100644 index b296e47f137d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.ResourceRegionType; -import com.azure.resourcemanager.eventgrid.models.TopicTypeInfo; -import com.azure.resourcemanager.eventgrid.models.TopicTypeProvisioningState; -import com.azure.resourcemanager.eventgrid.models.TopicTypeSourceScope; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicTypesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provider\":\"deepfhgan\",\"displayName\":\"wxqhpjhubo\",\"description\":\"vzgaybvr\",\"resourceRegionType\":\"RegionalResource\",\"provisioningState\":\"Creating\",\"supportedLocations\":[\"xnwfmzvzt\",\"uebpamq\",\"fcssanybzzghvd\"],\"sourceResourceFormat\":\"umyjsvcd\",\"supportedScopesForSource\":[\"ResourceGroup\",\"Resource\",\"ResourceGroup\"],\"areRegionalAndGlobalSourcesSupported\":false,\"additionalEnforcedPermissions\":[{\"permissionName\":\"nzxezriwgo\",\"isDataAction\":true},{\"permissionName\":\"cqksaaapxjh\",\"isDataAction\":false},{\"permissionName\":\"benwsdfp\",\"isDataAction\":false}]},\"id\":\"ahlfrcqk\",\"name\":\"pmvzpireszya\",\"type\":\"gomlb\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.topicTypes().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("deepfhgan", response.iterator().next().provider()); - Assertions.assertEquals("wxqhpjhubo", response.iterator().next().displayName()); - Assertions.assertEquals("vzgaybvr", response.iterator().next().description()); - Assertions.assertEquals(ResourceRegionType.REGIONAL_RESOURCE, response.iterator().next().resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.CREATING, response.iterator().next().provisioningState()); - Assertions.assertEquals("xnwfmzvzt", response.iterator().next().supportedLocations().get(0)); - Assertions.assertEquals("umyjsvcd", response.iterator().next().sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.RESOURCE_GROUP, - response.iterator().next().supportedScopesForSource().get(0)); - Assertions.assertEquals(false, response.iterator().next().areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("nzxezriwgo", - response.iterator().next().additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertEquals(true, response.iterator().next().additionalEnforcedPermissions().get(0).isDataAction()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListResultTests.java deleted file mode 100644 index d9b883c63aaf..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListResultTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.TopicTypeInfoInner; -import com.azure.resourcemanager.eventgrid.models.ResourceRegionType; -import com.azure.resourcemanager.eventgrid.models.TopicTypeAdditionalEnforcedPermission; -import com.azure.resourcemanager.eventgrid.models.TopicTypeProvisioningState; -import com.azure.resourcemanager.eventgrid.models.TopicTypeSourceScope; -import com.azure.resourcemanager.eventgrid.models.TopicTypesListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TopicTypesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicTypesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provider\":\"pvti\",\"displayName\":\"zbpdbo\",\"description\":\"gryfqiuasig\",\"resourceRegionType\":\"GlobalResource\",\"provisioningState\":\"Canceled\",\"supportedLocations\":[\"equygdjboqgrmtq\",\"kqevadrmmw\"],\"sourceResourceFormat\":\"awvcmjzkxiid\",\"supportedScopesForSource\":[\"ManagementGroup\",\"Resource\",\"ManagementGroup\",\"ManagementGroup\"],\"areRegionalAndGlobalSourcesSupported\":true,\"additionalEnforcedPermissions\":[{\"permissionName\":\"qazu\",\"isDataAction\":false},{\"permissionName\":\"zkrrcoiisba\",\"isDataAction\":false},{\"permissionName\":\"ccek\",\"isDataAction\":false},{\"permissionName\":\"sbezaxyfukzxuizh\",\"isDataAction\":false}]},\"id\":\"epkpe\",\"name\":\"iarxqiubxdukec\",\"type\":\"xdazv\"}]}") - .toObject(TopicTypesListResult.class); - Assertions.assertEquals("pvti", model.value().get(0).provider()); - Assertions.assertEquals("zbpdbo", model.value().get(0).displayName()); - Assertions.assertEquals("gryfqiuasig", model.value().get(0).description()); - Assertions.assertEquals(ResourceRegionType.GLOBAL_RESOURCE, model.value().get(0).resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.CANCELED, model.value().get(0).provisioningState()); - Assertions.assertEquals("equygdjboqgrmtq", model.value().get(0).supportedLocations().get(0)); - Assertions.assertEquals("awvcmjzkxiid", model.value().get(0).sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.MANAGEMENT_GROUP, - model.value().get(0).supportedScopesForSource().get(0)); - Assertions.assertEquals(true, model.value().get(0).areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("qazu", model.value().get(0).additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertEquals(false, model.value().get(0).additionalEnforcedPermissions().get(0).isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicTypesListResult model = new TopicTypesListResult().withValue(Arrays.asList(new TopicTypeInfoInner() - .withProvider("pvti") - .withDisplayName("zbpdbo") - .withDescription("gryfqiuasig") - .withResourceRegionType(ResourceRegionType.GLOBAL_RESOURCE) - .withProvisioningState(TopicTypeProvisioningState.CANCELED) - .withSupportedLocations(Arrays.asList("equygdjboqgrmtq", "kqevadrmmw")) - .withSourceResourceFormat("awvcmjzkxiid") - .withSupportedScopesForSource( - Arrays.asList(TopicTypeSourceScope.MANAGEMENT_GROUP, TopicTypeSourceScope.RESOURCE, - TopicTypeSourceScope.MANAGEMENT_GROUP, TopicTypeSourceScope.MANAGEMENT_GROUP)) - .withAreRegionalAndGlobalSourcesSupported(true) - .withAdditionalEnforcedPermissions(Arrays.asList( - new TopicTypeAdditionalEnforcedPermission().withPermissionName("qazu").withIsDataAction(false), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("zkrrcoiisba").withIsDataAction(false), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("ccek").withIsDataAction(false), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("sbezaxyfukzxuizh") - .withIsDataAction(false))))); - model = BinaryData.fromObject(model).toObject(TopicTypesListResult.class); - Assertions.assertEquals("pvti", model.value().get(0).provider()); - Assertions.assertEquals("zbpdbo", model.value().get(0).displayName()); - Assertions.assertEquals("gryfqiuasig", model.value().get(0).description()); - Assertions.assertEquals(ResourceRegionType.GLOBAL_RESOURCE, model.value().get(0).resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.CANCELED, model.value().get(0).provisioningState()); - Assertions.assertEquals("equygdjboqgrmtq", model.value().get(0).supportedLocations().get(0)); - Assertions.assertEquals("awvcmjzkxiid", model.value().get(0).sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.MANAGEMENT_GROUP, - model.value().get(0).supportedScopesForSource().get(0)); - Assertions.assertEquals(true, model.value().get(0).areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("qazu", model.value().get(0).additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertEquals(false, model.value().get(0).additionalEnforcedPermissions().get(0).isDataAction()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicUpdateParameterPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicUpdateParameterPropertiesTests.java deleted file mode 100644 index 1a33d9e30d12..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicUpdateParameterPropertiesTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.TopicUpdateParameterProperties; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TopicUpdateParameterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicUpdateParameterProperties model = BinaryData.fromString( - "{\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"cdp\",\"action\":\"Allow\"},{\"ipMask\":\"qrmgjfbpkuw\",\"action\":\"Allow\"},{\"ipMask\":\"ojfizfav\",\"action\":\"Allow\"},{\"ipMask\":\"fbcyaykmm\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.2\",\"disableLocalAuth\":true,\"dataResidencyBoundary\":\"WithinGeopair\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"hqkb\":{\"description\":\"rsxkr\",\"displayName\":\"bjazejwwviy\",\"documentationUrl\":\"ps\",\"dataSchemaUrl\":\"brnnhjxsqw\"},\"elpkpbafvafhlbyl\":{\"description\":\"etpozycyqiq\",\"displayName\":\"gfsetzlexbsfled\",\"documentationUrl\":\"ojpziuwfb\",\"dataSchemaUrl\":\"kdtnhqsyclj\"},\"wsigrbjbxsj\":{\"description\":\"bevxrhyzd\",\"displayName\":\"rsofpltdbmairrh\",\"documentationUrl\":\"fnrac\",\"dataSchemaUrl\":\"pqigtuujwouhd\"}}}}") - .toObject(TopicUpdateParameterProperties.class); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("cdp", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("rsxkr", model.eventTypeInfo().inlineEventTypes().get("hqkb").description()); - Assertions.assertEquals("bjazejwwviy", model.eventTypeInfo().inlineEventTypes().get("hqkb").displayName()); - Assertions.assertEquals("ps", model.eventTypeInfo().inlineEventTypes().get("hqkb").documentationUrl()); - Assertions.assertEquals("brnnhjxsqw", model.eventTypeInfo().inlineEventTypes().get("hqkb").dataSchemaUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicUpdateParameterProperties model - = new TopicUpdateParameterProperties().withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("cdp").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("qrmgjfbpkuw").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("ojfizfav").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("fbcyaykmm").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) - .withDisableLocalAuth(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("hqkb", - new InlineEventProperties().withDescription("rsxkr") - .withDisplayName("bjazejwwviy") - .withDocumentationUrl("ps") - .withDataSchemaUrl("brnnhjxsqw"), - "elpkpbafvafhlbyl", - new InlineEventProperties().withDescription("etpozycyqiq") - .withDisplayName("gfsetzlexbsfled") - .withDocumentationUrl("ojpziuwfb") - .withDataSchemaUrl("kdtnhqsyclj"), - "wsigrbjbxsj", - new InlineEventProperties().withDescription("bevxrhyzd") - .withDisplayName("rsofpltdbmairrh") - .withDocumentationUrl("fnrac") - .withDataSchemaUrl("pqigtuujwouhd")))); - model = BinaryData.fromObject(model).toObject(TopicUpdateParameterProperties.class); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("cdp", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("rsxkr", model.eventTypeInfo().inlineEventTypes().get("hqkb").description()); - Assertions.assertEquals("bjazejwwviy", model.eventTypeInfo().inlineEventTypes().get("hqkb").displayName()); - Assertions.assertEquals("ps", model.eventTypeInfo().inlineEventTypes().get("hqkb").documentationUrl()); - Assertions.assertEquals("brnnhjxsqw", model.eventTypeInfo().inlineEventTypes().get("hqkb").dataSchemaUrl()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicUpdateParametersTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicUpdateParametersTests.java deleted file mode 100644 index beb7944cb7f6..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicUpdateParametersTests.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceSku; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.TopicUpdateParameters; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TopicUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"sybwptdaca\":\"hwddkvbxgkq\",\"iwenazero\":\"vvlfntymtp\",\"lsxkd\":\"zrsq\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"fgsdpcvessmzhhk\",\"tenantId\":\"ip\",\"userAssignedIdentities\":{\"hta\":{\"principalId\":\"ctekval\",\"clientId\":\"htjqvqyvw\"}}},\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"se\",\"action\":\"Allow\"},{\"ipMask\":\"ivzrrryveimipsk\",\"action\":\"Allow\"},{\"ipMask\":\"tv\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.1\",\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinGeopair\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"floygbdgwumg\":{\"description\":\"gsyeipqdsmjtg\",\"displayName\":\"gdgkki\",\"documentationUrl\":\"plkcsm\",\"dataSchemaUrl\":\"hwtbbaedorvvm\"},\"jnhvlqjbekpeeks\":{\"description\":\"gdhpabgdexjddv\",\"displayName\":\"aqwotmmwl\",\"documentationUrl\":\"olsrsxapt\",\"dataSchemaUrl\":\"hexcgjokj\"},\"bztensvkzykjtj\":{\"description\":\"ksdqhjvy\",\"displayName\":\"xeslkhhustcpoqm\",\"documentationUrl\":\"nwqjwgokn\",\"dataSchemaUrl\":\"jjjkxybwfdbk\"}}}},\"sku\":{\"name\":\"Basic\"}}") - .toObject(TopicUpdateParameters.class); - Assertions.assertEquals("hwddkvbxgkq", model.tags().get("sybwptdaca")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("fgsdpcvessmzhhk", model.identity().principalId()); - Assertions.assertEquals("ip", model.identity().tenantId()); - Assertions.assertEquals("ctekval", model.identity().userAssignedIdentities().get("hta").principalId()); - Assertions.assertEquals("htjqvqyvw", model.identity().userAssignedIdentities().get("hta").clientId()); - Assertions.assertEquals(Sku.BASIC, model.sku().name()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("se", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("gsyeipqdsmjtg", - model.eventTypeInfo().inlineEventTypes().get("floygbdgwumg").description()); - Assertions.assertEquals("gdgkki", model.eventTypeInfo().inlineEventTypes().get("floygbdgwumg").displayName()); - Assertions.assertEquals("plkcsm", - model.eventTypeInfo().inlineEventTypes().get("floygbdgwumg").documentationUrl()); - Assertions.assertEquals("hwtbbaedorvvm", - model.eventTypeInfo().inlineEventTypes().get("floygbdgwumg").dataSchemaUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicUpdateParameters model - = new TopicUpdateParameters() - .withTags(mapOf("sybwptdaca", "hwddkvbxgkq", "iwenazero", "vvlfntymtp", "lsxkd", "zrsq")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("fgsdpcvessmzhhk") - .withTenantId("ip") - .withUserAssignedIdentities(mapOf("hta", - new UserIdentityProperties().withPrincipalId("ctekval").withClientId("htjqvqyvw")))) - .withSku(new ResourceSku().withName(Sku.BASIC)) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("se").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("ivzrrryveimipsk").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("tv").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) - .withDisableLocalAuth(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("floygbdgwumg", - new InlineEventProperties().withDescription("gsyeipqdsmjtg") - .withDisplayName("gdgkki") - .withDocumentationUrl("plkcsm") - .withDataSchemaUrl("hwtbbaedorvvm"), - "jnhvlqjbekpeeks", - new InlineEventProperties().withDescription("gdhpabgdexjddv") - .withDisplayName("aqwotmmwl") - .withDocumentationUrl("olsrsxapt") - .withDataSchemaUrl("hexcgjokj"), - "bztensvkzykjtj", - new InlineEventProperties().withDescription("ksdqhjvy") - .withDisplayName("xeslkhhustcpoqm") - .withDocumentationUrl("nwqjwgokn") - .withDataSchemaUrl("jjjkxybwfdbk")))); - model = BinaryData.fromObject(model).toObject(TopicUpdateParameters.class); - Assertions.assertEquals("hwddkvbxgkq", model.tags().get("sybwptdaca")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("fgsdpcvessmzhhk", model.identity().principalId()); - Assertions.assertEquals("ip", model.identity().tenantId()); - Assertions.assertEquals("ctekval", model.identity().userAssignedIdentities().get("hta").principalId()); - Assertions.assertEquals("htjqvqyvw", model.identity().userAssignedIdentities().get("hta").clientId()); - Assertions.assertEquals(Sku.BASIC, model.sku().name()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("se", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("gsyeipqdsmjtg", - model.eventTypeInfo().inlineEventTypes().get("floygbdgwumg").description()); - Assertions.assertEquals("gdgkki", model.eventTypeInfo().inlineEventTypes().get("floygbdgwumg").displayName()); - Assertions.assertEquals("plkcsm", - model.eventTypeInfo().inlineEventTypes().get("floygbdgwumg").documentationUrl()); - Assertions.assertEquals("hwtbbaedorvvm", - model.eventTypeInfo().inlineEventTypes().get("floygbdgwumg").dataSchemaUrl()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsConfigurationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsConfigurationTests.java deleted file mode 100644 index faac954308cf..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsConfigurationTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.CustomDomainConfiguration; -import com.azure.resourcemanager.eventgrid.models.CustomDomainIdentity; -import com.azure.resourcemanager.eventgrid.models.CustomDomainIdentityType; -import com.azure.resourcemanager.eventgrid.models.CustomDomainValidationState; -import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TopicsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicsConfiguration model = BinaryData.fromString( - "{\"hostname\":\"nxkrlgnyhmossxkk\",\"customDomains\":[{\"fullyQualifiedDomainName\":\"rrghxjbdhqxvcxgf\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"shrnsvbuswdvz\"},\"certificateUrl\":\"bycnunvjsrtkf\",\"expectedTxtRecordName\":\"nopqgikyzirtx\",\"expectedTxtRecordValue\":\"uxzejntpsew\"}]}") - .toObject(TopicsConfiguration.class); - Assertions.assertEquals("rrghxjbdhqxvcxgf", model.customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.PENDING, model.customDomains().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, model.customDomains().get(0).identity().type()); - Assertions.assertEquals("shrnsvbuswdvz", model.customDomains().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("bycnunvjsrtkf", model.customDomains().get(0).certificateUrl()); - Assertions.assertEquals("nopqgikyzirtx", model.customDomains().get(0).expectedTxtRecordName()); - Assertions.assertEquals("uxzejntpsew", model.customDomains().get(0).expectedTxtRecordValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicsConfiguration model = new TopicsConfiguration().withCustomDomains( - Arrays.asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("rrghxjbdhqxvcxgf") - .withValidationState(CustomDomainValidationState.PENDING) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("shrnsvbuswdvz")) - .withCertificateUrl("bycnunvjsrtkf") - .withExpectedTxtRecordName("nopqgikyzirtx") - .withExpectedTxtRecordValue("uxzejntpsew"))); - model = BinaryData.fromObject(model).toObject(TopicsConfiguration.class); - Assertions.assertEquals("rrghxjbdhqxvcxgf", model.customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.PENDING, model.customDomains().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, model.customDomains().get(0).identity().type()); - Assertions.assertEquals("shrnsvbuswdvz", model.customDomains().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("bycnunvjsrtkf", model.customDomains().get(0).certificateUrl()); - Assertions.assertEquals("nopqgikyzirtx", model.customDomains().get(0).expectedTxtRecordName()); - Assertions.assertEquals("uxzejntpsew", model.customDomains().get(0).expectedTxtRecordValue()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 9b44b8605d48..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceKind; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.Topic; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"vmmnii\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"lhjnskbggicnqwl\",\"name\":\"tmwpblxk\",\"type\":\"kqgvxrktj\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"wtspanbqxasevche\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"edyybruholaemwcg\",\"name\":\"mmrimaabsq\",\"type\":\"lonbzaowcahdkmb\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"rije\",\"bfsjwfczglk\",\"bgukbsvbwyoty\",\"nb\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"gclxaxwcffa\",\"name\":\"psdzkuc\",\"type\":\"zg\"}],\"provisioningState\":\"Failed\",\"endpoint\":\"qip\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"xf\":{\"description\":\"sbzrnmuv\",\"displayName\":\"pu\",\"documentationUrl\":\"ddtbfmekjcnginxd\",\"dataSchemaUrl\":\"aoy\"},\"axnlsfgnysca\":{\"description\":\"yxzmx\",\"displayName\":\"ofxlttxo\",\"documentationUrl\":\"tdnzujsjirkrpskc\",\"dataSchemaUrl\":\"mmofbnivdqtkyk\"},\"wahdrdvhaztkxbi\":{\"description\":\"ptb\",\"displayName\":\"txygxx\",\"documentationUrl\":\"eecvjwyuveox\",\"dataSchemaUrl\":\"z\"},\"qwdr\":{\"description\":\"fgxmbr\",\"displayName\":\"mw\",\"documentationUrl\":\"iosiqsy\",\"dataSchemaUrl\":\"f\"}}},\"minimumTlsVersionAllowed\":\"1.1\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"lmrc\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"tkounzsiyw\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"qnnfywt\",\"tenantId\":\"ow\",\"userAssignedIdentities\":{\"ylxdevfiyymotuzb\":{\"principalId\":\"hczygpmg\",\"clientId\":\"culojh\"},\"vswmehfxrtt\":{\"principalId\":\"wjmtftcvelniru\",\"clientId\":\"qnstpaqpibjg\"},\"mbzdxmsyn\":{\"principalId\":\"msennqfabqcama\",\"clientId\":\"ctcxs\"},\"brnxhjtlxfikj\":{\"principalId\":\"d\",\"clientId\":\"yufxuzmsvzyq\"}}},\"kind\":\"Azure\",\"extendedLocation\":{\"name\":\"vwwuasnjeg\",\"type\":\"trxboz\"},\"location\":\"jcnwjzb\",\"tags\":{\"i\":\"xrnwvdsvo\",\"sorgf\":\"awws\",\"fh\":\"jxsawooau\"},\"id\":\"fqkmwz\",\"name\":\"d\",\"type\":\"yoybm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Topic response = manager.topics() - .getByResourceGroupWithResponse("ikesmkwtzgfr", "gjhxerxl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("jcnwjzb", response.location()); - Assertions.assertEquals("xrnwvdsvo", response.tags().get("i")); - Assertions.assertEquals(Sku.BASIC, response.sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("qnnfywt", response.identity().principalId()); - Assertions.assertEquals("ow", response.identity().tenantId()); - Assertions.assertEquals("hczygpmg", - response.identity().userAssignedIdentities().get("ylxdevfiyymotuzb").principalId()); - Assertions.assertEquals("culojh", - response.identity().userAssignedIdentities().get("ylxdevfiyymotuzb").clientId()); - Assertions.assertEquals(ResourceKind.AZURE, response.kind()); - Assertions.assertEquals("vwwuasnjeg", response.extendedLocation().name()); - Assertions.assertEquals("trxboz", response.extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("sbzrnmuv", response.eventTypeInfo().inlineEventTypes().get("xf").description()); - Assertions.assertEquals("pu", response.eventTypeInfo().inlineEventTypes().get("xf").displayName()); - Assertions.assertEquals("ddtbfmekjcnginxd", - response.eventTypeInfo().inlineEventTypes().get("xf").documentationUrl()); - Assertions.assertEquals("aoy", response.eventTypeInfo().inlineEventTypes().get("xf").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_ONE, response.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, response.inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, response.publicNetworkAccess()); - Assertions.assertEquals("tkounzsiyw", response.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.inboundIpRules().get(0).action()); - Assertions.assertEquals(true, response.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, response.dataResidencyBoundary()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupMockTests.java deleted file mode 100644 index 79d5d1fe7666..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceKind; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.Topic; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"vewwpzrdwcgldo\",\"gcandxfhhhtes\",\"dqtdnnc\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"jdshvv\",\"name\":\"k\",\"type\":\"xccyijjimhijzr\"}],\"provisioningState\":\"Succeeded\",\"endpoint\":\"mvvsduy\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"uqtnylquevqmvy\":{\"description\":\"hhqld\",\"displayName\":\"ymn\",\"documentationUrl\":\"xiexqwqnghxnimvy\",\"dataSchemaUrl\":\"rxgunnqgy\"},\"on\":{\"description\":\"gmmue\",\"displayName\":\"nznwgsqufmjx\",\"documentationUrl\":\"oseqcazisvb\",\"dataSchemaUrl\":\"gcyjpgawepk\"},\"mfjew\":{\"description\":\"pghlr\",\"displayName\":\"bgblxbuibrvjzta\",\"documentationUrl\":\"vs\",\"dataSchemaUrl\":\"jihvfjcqrttjfuq\"},\"kwdtlcj\":{\"description\":\"q\",\"displayName\":\"vdostwyg\",\"documentationUrl\":\"mw\",\"dataSchemaUrl\":\"vxgwz\"}}},\"minimumTlsVersionAllowed\":\"1.1\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"zrbvgw\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"xvmdr\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"hhplkhww\",\"tenantId\":\"atveqm\",\"userAssignedIdentities\":{\"vsmfas\":{\"principalId\":\"w\",\"clientId\":\"yxryearmhpwbuk\"},\"l\":{\"principalId\":\"lvhqpoilo\",\"clientId\":\"aemcezevftmh\"},\"f\":{\"principalId\":\"kjyghztms\",\"clientId\":\"wtpcflcezswwvw\"}}},\"kind\":\"Azure\",\"extendedLocation\":{\"name\":\"bfpfhruptsyq\",\"type\":\"nqswxdowumxquk\"},\"location\":\"diohclqddn\",\"tags\":{\"mkaqldqabnwvpaq\":\"nebweddpnyzcwyj\"},\"id\":\"qxfbbigcfddofx\",\"name\":\"fbmjyyrqaedwo\",\"type\":\"ocytjgoeayokrw\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.topics().listByResourceGroup("mwdukinhl", "hg", 1419499050, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("diohclqddn", response.iterator().next().location()); - Assertions.assertEquals("nebweddpnyzcwyj", response.iterator().next().tags().get("mkaqldqabnwvpaq")); - Assertions.assertEquals(Sku.PREMIUM, response.iterator().next().sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("hhplkhww", response.iterator().next().identity().principalId()); - Assertions.assertEquals("atveqm", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("w", - response.iterator().next().identity().userAssignedIdentities().get("vsmfas").principalId()); - Assertions.assertEquals("yxryearmhpwbuk", - response.iterator().next().identity().userAssignedIdentities().get("vsmfas").clientId()); - Assertions.assertEquals(ResourceKind.AZURE, response.iterator().next().kind()); - Assertions.assertEquals("bfpfhruptsyq", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("nqswxdowumxquk", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.iterator().next().eventTypeInfo().kind()); - Assertions.assertEquals("hhqld", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("uqtnylquevqmvy").description()); - Assertions.assertEquals("ymn", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("uqtnylquevqmvy").displayName()); - Assertions.assertEquals("xiexqwqnghxnimvy", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("uqtnylquevqmvy").documentationUrl()); - Assertions.assertEquals("rxgunnqgy", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("uqtnylquevqmvy").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_ONE, response.iterator().next().minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, response.iterator().next().inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("xvmdr", response.iterator().next().inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); - Assertions.assertEquals(false, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, - response.iterator().next().dataResidencyBoundary()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesMockTests.java deleted file mode 100644 index 4c726cf661f2..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.EventType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicsListEventTypesMockTests { - @Test - public void testListEventTypes() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"sftqkrvmhv\",\"description\":\"vcpwtqsuspnh\",\"schemaUrl\":\"ydff\",\"isInDefaultSet\":false},\"id\":\"vrntfk\",\"name\":\"wacycsyotctkhf\",\"type\":\"fsatvcsx\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.topics() - .listEventTypes("ojoevzzufytdx", "lynzlyvap", "krbuoggtdltlcuha", "zijvaylzeo", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("sftqkrvmhv", response.iterator().next().displayName()); - Assertions.assertEquals("vcpwtqsuspnh", response.iterator().next().description()); - Assertions.assertEquals("ydff", response.iterator().next().schemaUrl()); - Assertions.assertEquals(false, response.iterator().next().isInDefaultSet()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListMockTests.java deleted file mode 100644 index c6a09f7aed49..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceKind; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.Topic; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TopicsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"iovrbhr\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"kvyyz\",\"name\":\"dc\",\"type\":\"xylaypdtyzvelffo\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"hjdfrwpsshrmnk\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"c\",\"name\":\"uogkscxjfsgm\",\"type\":\"spoebnx\"}],\"provisioningState\":\"Creating\",\"endpoint\":\"wscuyfqlam\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"vgoo\":{\"description\":\"k\",\"displayName\":\"uzp\",\"documentationUrl\":\"qpwnikxkcajgr\",\"dataSchemaUrl\":\"ct\"}}},\"minimumTlsVersionAllowed\":\"1.2\",\"inputSchema\":\"CustomEventSchema\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"lpcxi\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"qicfzf\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"None\",\"principalId\":\"finmp\",\"tenantId\":\"updkjrzfwkyl\",\"userAssignedIdentities\":{\"vwbzmfxlrymf\":{\"principalId\":\"xwhqdcclc\",\"clientId\":\"srupayl\"}}},\"kind\":\"AzureArc\",\"extendedLocation\":{\"name\":\"ywqnpfyd\",\"type\":\"bgcnyxbyx\"},\"location\":\"hmqyncgaullfstyy\",\"tags\":{\"wqgmhmqmiwxz\":\"pul\"},\"id\":\"v\",\"name\":\"zu\",\"type\":\"qfgufjnbxw\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.topics().list("n", 410963101, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hmqyncgaullfstyy", response.iterator().next().location()); - Assertions.assertEquals("pul", response.iterator().next().tags().get("wqgmhmqmiwxz")); - Assertions.assertEquals(Sku.PREMIUM, response.iterator().next().sku().name()); - Assertions.assertEquals(IdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("finmp", response.iterator().next().identity().principalId()); - Assertions.assertEquals("updkjrzfwkyl", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("xwhqdcclc", - response.iterator().next().identity().userAssignedIdentities().get("vwbzmfxlrymf").principalId()); - Assertions.assertEquals("srupayl", - response.iterator().next().identity().userAssignedIdentities().get("vwbzmfxlrymf").clientId()); - Assertions.assertEquals(ResourceKind.AZURE_ARC, response.iterator().next().kind()); - Assertions.assertEquals("ywqnpfyd", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("bgcnyxbyx", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.iterator().next().eventTypeInfo().kind()); - Assertions.assertEquals("k", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vgoo").description()); - Assertions.assertEquals("uzp", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vgoo").displayName()); - Assertions.assertEquals("qpwnikxkcajgr", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vgoo").documentationUrl()); - Assertions.assertEquals("ct", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vgoo").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_TWO, response.iterator().next().minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CUSTOM_EVENT_SCHEMA, response.iterator().next().inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("qicfzf", response.iterator().next().inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); - Assertions.assertEquals(false, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, - response.iterator().next().dataResidencyBoundary()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListResultTests.java deleted file mode 100644 index f872a3c8ca4b..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListResultTests.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.TopicInner; -import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; -import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; -import com.azure.resourcemanager.eventgrid.models.IdentityInfo; -import com.azure.resourcemanager.eventgrid.models.IdentityType; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.InputSchema; -import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; -import com.azure.resourcemanager.eventgrid.models.IpActionType; -import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.ResourceKind; -import com.azure.resourcemanager.eventgrid.models.ResourceSku; -import com.azure.resourcemanager.eventgrid.models.Sku; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.TopicsListResult; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TopicsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopicsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"kjyaznumtg\",\"name\":\"m\",\"type\":\"wdchozfn\"},{\"properties\":{},\"id\":\"exlvxnoakiz\",\"name\":\"oaiknaqlnuwig\",\"type\":\"yxl\"},{\"properties\":{},\"id\":\"wphvxz\",\"name\":\"wxh\",\"type\":\"pejtl\"}],\"provisioningState\":\"Canceled\",\"endpoint\":\"onwivkcqhrxhxkn\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"kyupijubyqj\":{},\"kakfqfr\":{},\"em\":{}}},\"minimumTlsVersionAllowed\":\"1.2\",\"inputSchema\":\"CustomEventSchema\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"jascowvfdjkpd\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"snmgzvyfi\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"olyahluqwqulsut\",\"tenantId\":\"bhxykfhyqezvqqug\",\"userAssignedIdentities\":{\"agk\":{\"principalId\":\"bcvex\",\"clientId\":\"uquowtljvfwhr\"},\"gglmepjpfsey\":{\"principalId\":\"xv\",\"clientId\":\"tvbczsulm\"},\"p\":{\"principalId\":\"sa\",\"clientId\":\"psznga\"},\"zrgjfok\":{\"principalId\":\"lkvec\",\"clientId\":\"jcngoadyed\"}}},\"kind\":\"Azure\",\"extendedLocation\":{\"name\":\"itpkpztrgdg\",\"type\":\"coqra\"},\"location\":\"ugyxpqit\",\"tags\":{\"z\":\"alwvskbu\",\"ltcoqc\":\"caqt\"},\"id\":\"jpds\",\"name\":\"zakuejk\",\"type\":\"vbiztjofqcv\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"ycsjmlbem\",\"name\":\"ej\",\"type\":\"riuxegthortuda\"}],\"provisioningState\":\"Updating\",\"endpoint\":\"felqerpptc\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"nhii\":{},\"ialwc\":{}}},\"minimumTlsVersionAllowed\":\"1.0\",\"inputSchema\":\"CustomEventSchema\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"ccgzpraoxnyu\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"ftipwcxbyubhiq\",\"action\":\"Allow\"},{\"ipMask\":\"rnpnuhzafccnuh\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"tvcrkdlbnbqxvh\",\"tenantId\":\"yhzlwxaeaovurexd\",\"userAssignedIdentities\":{\"mvmmagoaqylkjz\":{\"principalId\":\"dwead\",\"clientId\":\"zmwntopagt\"},\"itpfinzcpdl\":{\"principalId\":\"iua\",\"clientId\":\"cgm\"},\"hompheqdurelyu\":{\"principalId\":\"rlgjm\",\"clientId\":\"drvcqguef\"},\"brzmqxucycijoclx\":{\"principalId\":\"fyoum\",\"clientId\":\"kyeclcdigpta\"}}},\"kind\":\"Azure\",\"extendedLocation\":{\"name\":\"cyzyzjdnrqjbt\",\"type\":\"eaoqaqbzgyhf\"},\"location\":\"v\",\"tags\":{\"uliyslpkcv\":\"bwbqamt\",\"auxxepmyw\":\"w\",\"ijqpkzfbojxjmcs\":\"ormcqmic\"},\"id\":\"yqwixvcpwnkwywzw\",\"name\":\"falickduoiqtamty\",\"type\":\"sknxrwzawnvsbcf\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"nvhycvdimwrz\",\"name\":\"e\",\"type\":\"zgyufutrwp\"},{\"properties\":{},\"id\":\"ryekzkd\",\"name\":\"meottawj\",\"type\":\"osxw\"}],\"provisioningState\":\"Updating\",\"endpoint\":\"jtfvpndpmiljpn\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"llzsauz\":{},\"jlxeehuxiqhz\":{},\"raymezx\":{},\"skihmxrfd\":{}}},\"minimumTlsVersionAllowed\":\"1.0\",\"inputSchema\":\"CustomEventSchema\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"wyyshtuwgm\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"wzyif\",\"action\":\"Allow\"},{\"ipMask\":\"ltxeqip\",\"action\":\"Allow\"},{\"ipMask\":\"yimsfayorpr\",\"action\":\"Allow\"},{\"ipMask\":\"oge\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"aekqsykvwj\",\"tenantId\":\"pkevmylt\",\"userAssignedIdentities\":{\"n\":{\"principalId\":\"pxklurccl\",\"clientId\":\"xa\"},\"qm\":{\"principalId\":\"ytzpo\",\"clientId\":\"wxigpxv\"}}},\"kind\":\"AzureArc\",\"extendedLocation\":{\"name\":\"pifdfaifyzyzeyu\",\"type\":\"eidszlfytoi\"},\"location\":\"gygvfltgvdiho\",\"tags\":{\"wkd\":\"rxwe\",\"ucpcunnuzdqumoen\":\"cy\"},\"id\":\"dnaienhqhskndnel\",\"name\":\"kaa\",\"type\":\"lknwfoanniyop\"}],\"nextLink\":\"xivcnrlyxnu\"}") - .toObject(TopicsListResult.class); - Assertions.assertEquals("ugyxpqit", model.value().get(0).location()); - Assertions.assertEquals("alwvskbu", model.value().get(0).tags().get("z")); - Assertions.assertEquals(Sku.BASIC, model.value().get(0).sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("olyahluqwqulsut", model.value().get(0).identity().principalId()); - Assertions.assertEquals("bhxykfhyqezvqqug", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("bcvex", - model.value().get(0).identity().userAssignedIdentities().get("agk").principalId()); - Assertions.assertEquals("uquowtljvfwhr", - model.value().get(0).identity().userAssignedIdentities().get("agk").clientId()); - Assertions.assertEquals(ResourceKind.AZURE, model.value().get(0).kind()); - Assertions.assertEquals("itpkpztrgdg", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("coqra", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.value().get(0).eventTypeInfo().kind()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CUSTOM_EVENT_SCHEMA, model.value().get(0).inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("snmgzvyfi", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, model.value().get(0).dataResidencyBoundary()); - Assertions.assertEquals("xivcnrlyxnu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicsListResult model = new TopicsListResult().withValue(Arrays.asList( - new TopicInner().withLocation("ugyxpqit") - .withTags(mapOf("z", "alwvskbu", "ltcoqc", "caqt")) - .withSku(new ResourceSku().withName(Sku.BASIC)) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("olyahluqwqulsut") - .withTenantId("bhxykfhyqezvqqug") - .withUserAssignedIdentities(mapOf("agk", - new UserIdentityProperties().withPrincipalId("bcvex").withClientId("uquowtljvfwhr"), - "gglmepjpfsey", new UserIdentityProperties().withPrincipalId("xv").withClientId("tvbczsulm"), - "p", new UserIdentityProperties().withPrincipalId("sa").withClientId("psznga"), "zrgjfok", - new UserIdentityProperties().withPrincipalId("lkvec").withClientId("jcngoadyed")))) - .withKind(ResourceKind.AZURE) - .withExtendedLocation(new ExtendedLocation().withName("itpkpztrgdg").withType("coqra")) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("kyupijubyqj", new InlineEventProperties(), "kakfqfr", - new InlineEventProperties(), "em", new InlineEventProperties()))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) - .withInputSchema(InputSchema.CUSTOM_EVENT_SCHEMA) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("snmgzvyfi").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_REGION), - new TopicInner().withLocation("v") - .withTags(mapOf("uliyslpkcv", "bwbqamt", "auxxepmyw", "w", "ijqpkzfbojxjmcs", "ormcqmic")) - .withSku(new ResourceSku().withName(Sku.BASIC)) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("tvcrkdlbnbqxvh") - .withTenantId("yhzlwxaeaovurexd") - .withUserAssignedIdentities(mapOf("mvmmagoaqylkjz", - new UserIdentityProperties().withPrincipalId("dwead").withClientId("zmwntopagt"), "itpfinzcpdl", - new UserIdentityProperties().withPrincipalId("iua").withClientId("cgm"), "hompheqdurelyu", - new UserIdentityProperties().withPrincipalId("rlgjm").withClientId("drvcqguef"), - "brzmqxucycijoclx", - new UserIdentityProperties().withPrincipalId("fyoum").withClientId("kyeclcdigpta")))) - .withKind(ResourceKind.AZURE) - .withExtendedLocation(new ExtendedLocation().withName("cyzyzjdnrqjbt").withType("eaoqaqbzgyhf")) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("nhii", new InlineEventProperties(), "ialwc", - new InlineEventProperties()))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withInputSchema(InputSchema.CUSTOM_EVENT_SCHEMA) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules(Arrays - .asList(new InboundIpRule().withIpMask("ftipwcxbyubhiq") - .withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("rnpnuhzafccnuh").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR), - new TopicInner().withLocation("gygvfltgvdiho") - .withTags(mapOf("wkd", "rxwe", "ucpcunnuzdqumoen", "cy")) - .withSku(new ResourceSku().withName(Sku.PREMIUM)) - .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("aekqsykvwj") - .withTenantId("pkevmylt") - .withUserAssignedIdentities( - mapOf("n", new UserIdentityProperties().withPrincipalId("pxklurccl").withClientId("xa"), "qm", - new UserIdentityProperties().withPrincipalId("ytzpo").withClientId("wxigpxv")))) - .withKind(ResourceKind.AZURE_ARC) - .withExtendedLocation(new ExtendedLocation().withName("pifdfaifyzyzeyu").withType("eidszlfytoi")) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes( - mapOf("llzsauz", new InlineEventProperties(), "jlxeehuxiqhz", new InlineEventProperties(), - "raymezx", new InlineEventProperties(), "skihmxrfd", new InlineEventProperties()))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withInputSchema(InputSchema.CUSTOM_EVENT_SCHEMA) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("wzyif").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("ltxeqip").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("yimsfayorpr").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("oge").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR))) - .withNextLink("xivcnrlyxnu"); - model = BinaryData.fromObject(model).toObject(TopicsListResult.class); - Assertions.assertEquals("ugyxpqit", model.value().get(0).location()); - Assertions.assertEquals("alwvskbu", model.value().get(0).tags().get("z")); - Assertions.assertEquals(Sku.BASIC, model.value().get(0).sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("olyahluqwqulsut", model.value().get(0).identity().principalId()); - Assertions.assertEquals("bhxykfhyqezvqqug", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("bcvex", - model.value().get(0).identity().userAssignedIdentities().get("agk").principalId()); - Assertions.assertEquals("uquowtljvfwhr", - model.value().get(0).identity().userAssignedIdentities().get("agk").clientId()); - Assertions.assertEquals(ResourceKind.AZURE, model.value().get(0).kind()); - Assertions.assertEquals("itpkpztrgdg", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("coqra", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.value().get(0).eventTypeInfo().kind()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CUSTOM_EVENT_SCHEMA, model.value().get(0).inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("snmgzvyfi", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertEquals(true, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, model.value().get(0).dataResidencyBoundary()); - Assertions.assertEquals("xivcnrlyxnu", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/UpdateTopicsConfigurationInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/UpdateTopicsConfigurationInfoTests.java deleted file mode 100644 index 4a6a75f3a178..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/UpdateTopicsConfigurationInfoTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.CustomDomainConfiguration; -import com.azure.resourcemanager.eventgrid.models.CustomDomainIdentity; -import com.azure.resourcemanager.eventgrid.models.CustomDomainIdentityType; -import com.azure.resourcemanager.eventgrid.models.CustomDomainValidationState; -import com.azure.resourcemanager.eventgrid.models.UpdateTopicsConfigurationInfo; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateTopicsConfigurationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateTopicsConfigurationInfo model = BinaryData.fromString( - "{\"customDomains\":[{\"fullyQualifiedDomainName\":\"oknssxmojmsvpkjp\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"ql\"},\"certificateUrl\":\"x\",\"expectedTxtRecordName\":\"czheyd\",\"expectedTxtRecordValue\":\"dshmkxmaehvbbx\"},{\"fullyQualifiedDomainName\":\"ripltf\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"gx\"},\"certificateUrl\":\"rc\",\"expectedTxtRecordName\":\"yklyhpluodpvruud\",\"expectedTxtRecordValue\":\"zibt\"},{\"fullyQualifiedDomainName\":\"ostgkts\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"zedqbcvhzlhplo\"},\"certificateUrl\":\"kdl\",\"expectedTxtRecordName\":\"qfbumlkxtrqjf\",\"expectedTxtRecordValue\":\"lmbtxhwgfwsrt\"}]}") - .toObject(UpdateTopicsConfigurationInfo.class); - Assertions.assertEquals("oknssxmojmsvpkjp", model.customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD, - model.customDomains().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, - model.customDomains().get(0).identity().type()); - Assertions.assertEquals("ql", model.customDomains().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("x", model.customDomains().get(0).certificateUrl()); - Assertions.assertEquals("czheyd", model.customDomains().get(0).expectedTxtRecordName()); - Assertions.assertEquals("dshmkxmaehvbbx", model.customDomains().get(0).expectedTxtRecordValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateTopicsConfigurationInfo model = new UpdateTopicsConfigurationInfo().withCustomDomains(Arrays.asList( - new CustomDomainConfiguration().withFullyQualifiedDomainName("oknssxmojmsvpkjp") - .withValidationState(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("ql")) - .withCertificateUrl("x") - .withExpectedTxtRecordName("czheyd") - .withExpectedTxtRecordValue("dshmkxmaehvbbx"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("ripltf") - .withValidationState(CustomDomainValidationState.PENDING) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("gx")) - .withCertificateUrl("rc") - .withExpectedTxtRecordName("yklyhpluodpvruud") - .withExpectedTxtRecordValue("zibt"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("ostgkts") - .withValidationState(CustomDomainValidationState.APPROVED) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("zedqbcvhzlhplo")) - .withCertificateUrl("kdl") - .withExpectedTxtRecordName("qfbumlkxtrqjf") - .withExpectedTxtRecordValue("lmbtxhwgfwsrt"))); - model = BinaryData.fromObject(model).toObject(UpdateTopicsConfigurationInfo.class); - Assertions.assertEquals("oknssxmojmsvpkjp", model.customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD, - model.customDomains().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, - model.customDomains().get(0).identity().type()); - Assertions.assertEquals("ql", model.customDomains().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("x", model.customDomains().get(0).certificateUrl()); - Assertions.assertEquals("czheyd", model.customDomains().get(0).expectedTxtRecordName()); - Assertions.assertEquals("dshmkxmaehvbbx", model.customDomains().get(0).expectedTxtRecordValue()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/UserIdentityPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/UserIdentityPropertiesTests.java deleted file mode 100644 index 4bb5918742d8..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/UserIdentityPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import org.junit.jupiter.api.Assertions; - -public final class UserIdentityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserIdentityProperties model = BinaryData.fromString("{\"principalId\":\"n\",\"clientId\":\"nxipeil\"}") - .toObject(UserIdentityProperties.class); - Assertions.assertEquals("n", model.principalId()); - Assertions.assertEquals("nxipeil", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserIdentityProperties model = new UserIdentityProperties().withPrincipalId("n").withClientId("nxipeil"); - model = BinaryData.fromObject(model).toObject(UserIdentityProperties.class); - Assertions.assertEquals("n", model.principalId()); - Assertions.assertEquals("nxipeil", model.clientId()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnerInnerTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnerInnerTests.java deleted file mode 100644 index 3a628c9fd004..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnerInnerTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.VerifiedPartnerInner; -import com.azure.resourcemanager.eventgrid.models.PartnerDetails; -import com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class VerifiedPartnerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VerifiedPartnerInner model = BinaryData.fromString( - "{\"properties\":{\"partnerRegistrationImmutableId\":\"ce434753-11b7-4b67-8319-b96393ba7e06\",\"organizationName\":\"lss\",\"partnerDisplayName\":\"jomevtfycnlb\",\"partnerTopicDetails\":{\"description\":\"codkkgj\",\"longDescription\":\"ytssikiz\",\"setupUri\":\"ufqbvntnr\"},\"partnerDestinationDetails\":{\"description\":\"sorhcekx\",\"longDescription\":\"lykmxcpwzvmdo\",\"setupUri\":\"qdtiwlwxlb\"},\"provisioningState\":\"Failed\"},\"id\":\"bazqicqchygtvxby\",\"name\":\"anepubd\",\"type\":\"kxyqvgxiaodetv\"}") - .toObject(VerifiedPartnerInner.class); - Assertions.assertEquals(UUID.fromString("ce434753-11b7-4b67-8319-b96393ba7e06"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("lss", model.organizationName()); - Assertions.assertEquals("jomevtfycnlb", model.partnerDisplayName()); - Assertions.assertEquals("codkkgj", model.partnerTopicDetails().description()); - Assertions.assertEquals("ytssikiz", model.partnerTopicDetails().longDescription()); - Assertions.assertEquals("ufqbvntnr", model.partnerTopicDetails().setupUri()); - Assertions.assertEquals("sorhcekx", model.partnerDestinationDetails().description()); - Assertions.assertEquals("lykmxcpwzvmdo", model.partnerDestinationDetails().longDescription()); - Assertions.assertEquals("qdtiwlwxlb", model.partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.FAILED, model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VerifiedPartnerInner model = new VerifiedPartnerInner() - .withPartnerRegistrationImmutableId(UUID.fromString("ce434753-11b7-4b67-8319-b96393ba7e06")) - .withOrganizationName("lss") - .withPartnerDisplayName("jomevtfycnlb") - .withPartnerTopicDetails(new PartnerDetails().withDescription("codkkgj") - .withLongDescription("ytssikiz") - .withSetupUri("ufqbvntnr")) - .withPartnerDestinationDetails(new PartnerDetails().withDescription("sorhcekx") - .withLongDescription("lykmxcpwzvmdo") - .withSetupUri("qdtiwlwxlb")) - .withProvisioningState(VerifiedPartnerProvisioningState.FAILED); - model = BinaryData.fromObject(model).toObject(VerifiedPartnerInner.class); - Assertions.assertEquals(UUID.fromString("ce434753-11b7-4b67-8319-b96393ba7e06"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("lss", model.organizationName()); - Assertions.assertEquals("jomevtfycnlb", model.partnerDisplayName()); - Assertions.assertEquals("codkkgj", model.partnerTopicDetails().description()); - Assertions.assertEquals("ytssikiz", model.partnerTopicDetails().longDescription()); - Assertions.assertEquals("ufqbvntnr", model.partnerTopicDetails().setupUri()); - Assertions.assertEquals("sorhcekx", model.partnerDestinationDetails().description()); - Assertions.assertEquals("lykmxcpwzvmdo", model.partnerDestinationDetails().longDescription()); - Assertions.assertEquals("qdtiwlwxlb", model.partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.FAILED, model.provisioningState()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnerPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnerPropertiesTests.java deleted file mode 100644 index 446da97cdbc7..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnerPropertiesTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.VerifiedPartnerProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerDetails; -import com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class VerifiedPartnerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VerifiedPartnerProperties model = BinaryData.fromString( - "{\"partnerRegistrationImmutableId\":\"6495b39c-4a28-4566-9d30-eec92bd7994c\",\"organizationName\":\"xdxuwsaifmc\",\"partnerDisplayName\":\"osbz\",\"partnerTopicDetails\":{\"description\":\"gcv\",\"longDescription\":\"cknjolgj\",\"setupUri\":\"xpvelszerqzevxo\"},\"partnerDestinationDetails\":{\"description\":\"ntxwaljglzob\",\"longDescription\":\"waafrqulh\",\"setupUri\":\"yqbhd\"},\"provisioningState\":\"Canceled\"}") - .toObject(VerifiedPartnerProperties.class); - Assertions.assertEquals(UUID.fromString("6495b39c-4a28-4566-9d30-eec92bd7994c"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("xdxuwsaifmc", model.organizationName()); - Assertions.assertEquals("osbz", model.partnerDisplayName()); - Assertions.assertEquals("gcv", model.partnerTopicDetails().description()); - Assertions.assertEquals("cknjolgj", model.partnerTopicDetails().longDescription()); - Assertions.assertEquals("xpvelszerqzevxo", model.partnerTopicDetails().setupUri()); - Assertions.assertEquals("ntxwaljglzob", model.partnerDestinationDetails().description()); - Assertions.assertEquals("waafrqulh", model.partnerDestinationDetails().longDescription()); - Assertions.assertEquals("yqbhd", model.partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.CANCELED, model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VerifiedPartnerProperties model = new VerifiedPartnerProperties() - .withPartnerRegistrationImmutableId(UUID.fromString("6495b39c-4a28-4566-9d30-eec92bd7994c")) - .withOrganizationName("xdxuwsaifmc") - .withPartnerDisplayName("osbz") - .withPartnerTopicDetails(new PartnerDetails().withDescription("gcv") - .withLongDescription("cknjolgj") - .withSetupUri("xpvelszerqzevxo")) - .withPartnerDestinationDetails(new PartnerDetails().withDescription("ntxwaljglzob") - .withLongDescription("waafrqulh") - .withSetupUri("yqbhd")) - .withProvisioningState(VerifiedPartnerProvisioningState.CANCELED); - model = BinaryData.fromObject(model).toObject(VerifiedPartnerProperties.class); - Assertions.assertEquals(UUID.fromString("6495b39c-4a28-4566-9d30-eec92bd7994c"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("xdxuwsaifmc", model.organizationName()); - Assertions.assertEquals("osbz", model.partnerDisplayName()); - Assertions.assertEquals("gcv", model.partnerTopicDetails().description()); - Assertions.assertEquals("cknjolgj", model.partnerTopicDetails().longDescription()); - Assertions.assertEquals("xpvelszerqzevxo", model.partnerTopicDetails().setupUri()); - Assertions.assertEquals("ntxwaljglzob", model.partnerDestinationDetails().description()); - Assertions.assertEquals("waafrqulh", model.partnerDestinationDetails().longDescription()); - Assertions.assertEquals("yqbhd", model.partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.CANCELED, model.provisioningState()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetWithResponseMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetWithResponseMockTests.java deleted file mode 100644 index 42e173d8d8e4..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetWithResponseMockTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.VerifiedPartner; -import com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VerifiedPartnersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"956d353d-d339-4e58-b435-d60464fb55c7\",\"organizationName\":\"lndyclwgycv\",\"partnerDisplayName\":\"nzjcyqqzhembtbw\",\"partnerTopicDetails\":{\"description\":\"ba\",\"longDescription\":\"isj\",\"setupUri\":\"eajvmvvlooubsfx\"},\"partnerDestinationDetails\":{\"description\":\"eopsk\",\"longDescription\":\"cjomlupf\",\"setupUri\":\"usjcd\"},\"provisioningState\":\"Canceled\"},\"id\":\"gdw\",\"name\":\"rgdqyxaj\",\"type\":\"lgrcavqcwyzoqzkm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VerifiedPartner response - = manager.verifiedPartners().getWithResponse("wpsibxovuqoq", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(UUID.fromString("956d353d-d339-4e58-b435-d60464fb55c7"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("lndyclwgycv", response.organizationName()); - Assertions.assertEquals("nzjcyqqzhembtbw", response.partnerDisplayName()); - Assertions.assertEquals("ba", response.partnerTopicDetails().description()); - Assertions.assertEquals("isj", response.partnerTopicDetails().longDescription()); - Assertions.assertEquals("eajvmvvlooubsfx", response.partnerTopicDetails().setupUri()); - Assertions.assertEquals("eopsk", response.partnerDestinationDetails().description()); - Assertions.assertEquals("cjomlupf", response.partnerDestinationDetails().longDescription()); - Assertions.assertEquals("usjcd", response.partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.CANCELED, response.provisioningState()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListMockTests.java deleted file mode 100644 index 048a89a25334..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.eventgrid.EventGridManager; -import com.azure.resourcemanager.eventgrid.models.VerifiedPartner; -import com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VerifiedPartnersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"af2fa737-b0d3-4dd5-85e1-53e8b6c10627\",\"organizationName\":\"epbntqq\",\"partnerDisplayName\":\"gfgsq\",\"partnerTopicDetails\":{\"description\":\"efejsewrznequqyn\",\"longDescription\":\"wknhajksbsyo\",\"setupUri\":\"mqjhgcydijnmc\"},\"partnerDestinationDetails\":{\"description\":\"ssfcriqxzixtd\",\"longDescription\":\"wmvcdkucpxpyafrw\",\"setupUri\":\"orogeuv\"},\"provisioningState\":\"Creating\"},\"id\":\"pnr\",\"name\":\"jseml\",\"type\":\"ofrsnq\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - EventGridManager manager = EventGridManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.verifiedPartners().list("cwwsj", 1946015970, com.azure.core.util.Context.NONE); - - Assertions.assertEquals(UUID.fromString("af2fa737-b0d3-4dd5-85e1-53e8b6c10627"), - response.iterator().next().partnerRegistrationImmutableId()); - Assertions.assertEquals("epbntqq", response.iterator().next().organizationName()); - Assertions.assertEquals("gfgsq", response.iterator().next().partnerDisplayName()); - Assertions.assertEquals("efejsewrznequqyn", response.iterator().next().partnerTopicDetails().description()); - Assertions.assertEquals("wknhajksbsyo", response.iterator().next().partnerTopicDetails().longDescription()); - Assertions.assertEquals("mqjhgcydijnmc", response.iterator().next().partnerTopicDetails().setupUri()); - Assertions.assertEquals("ssfcriqxzixtd", response.iterator().next().partnerDestinationDetails().description()); - Assertions.assertEquals("wmvcdkucpxpyafrw", - response.iterator().next().partnerDestinationDetails().longDescription()); - Assertions.assertEquals("orogeuv", response.iterator().next().partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.CREATING, - response.iterator().next().provisioningState()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListResultTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListResultTests.java deleted file mode 100644 index 74539a06f210..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListResultTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.VerifiedPartnerInner; -import com.azure.resourcemanager.eventgrid.models.PartnerDetails; -import com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState; -import com.azure.resourcemanager.eventgrid.models.VerifiedPartnersListResult; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class VerifiedPartnersListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VerifiedPartnersListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"db08cc38-c0c0-424a-aeb4-c8d24bff0fa0\",\"organizationName\":\"fkb\",\"partnerDisplayName\":\"z\",\"partnerTopicDetails\":{\"description\":\"dltb\",\"longDescription\":\"tqjfgxxsaet\",\"setupUri\":\"dgvpyig\"},\"partnerDestinationDetails\":{\"description\":\"qilzdc\",\"longDescription\":\"wjoe\",\"setupUri\":\"ngucaifpaurww\"},\"provisioningState\":\"Canceled\"},\"id\":\"jqqacdmkx\",\"name\":\"xdcvjwcy\",\"type\":\"iakeciqc\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"d83e8f08-7c30-4112-b109-e5607b97ee59\",\"organizationName\":\"uicdsiwdfmmpzhzz\",\"partnerDisplayName\":\"ywrgyngydgr\",\"partnerTopicDetails\":{\"description\":\"cakiqao\",\"longDescription\":\"jrkc\",\"setupUri\":\"mgglvlmfe\"},\"partnerDestinationDetails\":{\"description\":\"qey\",\"longDescription\":\"ltygxhqfgqkayej\",\"setupUri\":\"tlgflwfgz\"},\"provisioningState\":\"Creating\"},\"id\":\"ijjcea\",\"name\":\"lijjjrtvam\",\"type\":\"a\"}],\"nextLink\":\"knxkvccxetyvkunm\"}") - .toObject(VerifiedPartnersListResult.class); - Assertions.assertEquals(UUID.fromString("db08cc38-c0c0-424a-aeb4-c8d24bff0fa0"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("fkb", model.value().get(0).organizationName()); - Assertions.assertEquals("z", model.value().get(0).partnerDisplayName()); - Assertions.assertEquals("dltb", model.value().get(0).partnerTopicDetails().description()); - Assertions.assertEquals("tqjfgxxsaet", model.value().get(0).partnerTopicDetails().longDescription()); - Assertions.assertEquals("dgvpyig", model.value().get(0).partnerTopicDetails().setupUri()); - Assertions.assertEquals("qilzdc", model.value().get(0).partnerDestinationDetails().description()); - Assertions.assertEquals("wjoe", model.value().get(0).partnerDestinationDetails().longDescription()); - Assertions.assertEquals("ngucaifpaurww", model.value().get(0).partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.CANCELED, model.value().get(0).provisioningState()); - Assertions.assertEquals("knxkvccxetyvkunm", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VerifiedPartnersListResult model - = new VerifiedPartnersListResult() - .withValue( - Arrays - .asList( - new VerifiedPartnerInner() - .withPartnerRegistrationImmutableId( - UUID.fromString("db08cc38-c0c0-424a-aeb4-c8d24bff0fa0")) - .withOrganizationName("fkb") - .withPartnerDisplayName("z") - .withPartnerTopicDetails(new PartnerDetails().withDescription("dltb") - .withLongDescription("tqjfgxxsaet") - .withSetupUri("dgvpyig")) - .withPartnerDestinationDetails(new PartnerDetails() - .withDescription("qilzdc") - .withLongDescription("wjoe") - .withSetupUri("ngucaifpaurww")) - .withProvisioningState(VerifiedPartnerProvisioningState.CANCELED), - new VerifiedPartnerInner() - .withPartnerRegistrationImmutableId( - UUID.fromString("d83e8f08-7c30-4112-b109-e5607b97ee59")) - .withOrganizationName("uicdsiwdfmmpzhzz") - .withPartnerDisplayName("ywrgyngydgr") - .withPartnerTopicDetails(new PartnerDetails().withDescription("cakiqao") - .withLongDescription("jrkc") - .withSetupUri("mgglvlmfe")) - .withPartnerDestinationDetails(new PartnerDetails().withDescription("qey") - .withLongDescription("ltygxhqfgqkayej") - .withSetupUri("tlgflwfgz")) - .withProvisioningState(VerifiedPartnerProvisioningState.CREATING))) - .withNextLink("knxkvccxetyvkunm"); - model = BinaryData.fromObject(model).toObject(VerifiedPartnersListResult.class); - Assertions.assertEquals(UUID.fromString("db08cc38-c0c0-424a-aeb4-c8d24bff0fa0"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("fkb", model.value().get(0).organizationName()); - Assertions.assertEquals("z", model.value().get(0).partnerDisplayName()); - Assertions.assertEquals("dltb", model.value().get(0).partnerTopicDetails().description()); - Assertions.assertEquals("tqjfgxxsaet", model.value().get(0).partnerTopicDetails().longDescription()); - Assertions.assertEquals("dgvpyig", model.value().get(0).partnerTopicDetails().setupUri()); - Assertions.assertEquals("qilzdc", model.value().get(0).partnerDestinationDetails().description()); - Assertions.assertEquals("wjoe", model.value().get(0).partnerDestinationDetails().longDescription()); - Assertions.assertEquals("ngucaifpaurww", model.value().get(0).partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.CANCELED, model.value().get(0).provisioningState()); - Assertions.assertEquals("knxkvccxetyvkunm", model.nextLink()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookEventSubscriptionDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookEventSubscriptionDestinationPropertiesTests.java deleted file mode 100644 index 55743a9418e0..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookEventSubscriptionDestinationPropertiesTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.WebhookEventSubscriptionDestinationProperties; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WebhookEventSubscriptionDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"endpointUrl\":\"cly\",\"endpointBaseUrl\":\"gxvrpjl\",\"maxEventsPerBatch\":116232980,\"preferredBatchSizeInKilobytes\":1979415273,\"azureActiveDirectoryTenantId\":\"ac\",\"azureActiveDirectoryApplicationIdOrUri\":\"nettepdjxqeskoy\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"lpckaewsedves\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"xegqphr\"}],\"minimumTlsVersionAllowed\":\"1.0\"}") - .toObject(WebhookEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("cly", model.endpointUrl()); - Assertions.assertEquals(116232980, model.maxEventsPerBatch()); - Assertions.assertEquals(1979415273, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("ac", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("nettepdjxqeskoy", model.azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("lpckaewsedves", model.deliveryAttributeMappings().get(0).name()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebhookEventSubscriptionDestinationProperties model - = new WebhookEventSubscriptionDestinationProperties().withEndpointUrl("cly") - .withMaxEventsPerBatch(116232980) - .withPreferredBatchSizeInKilobytes(1979415273) - .withAzureActiveDirectoryTenantId("ac") - .withAzureActiveDirectoryApplicationIdOrUri("nettepdjxqeskoy") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("lpckaewsedves"), - new DeliveryAttributeMapping().withName("xegqphr"))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO); - model = BinaryData.fromObject(model).toObject(WebhookEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("cly", model.endpointUrl()); - Assertions.assertEquals(116232980, model.maxEventsPerBatch()); - Assertions.assertEquals(1979415273, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("ac", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("nettepdjxqeskoy", model.azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("lpckaewsedves", model.deliveryAttributeMappings().get(0).name()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookEventSubscriptionDestinationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookEventSubscriptionDestinationTests.java deleted file mode 100644 index f6b89115877d..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookEventSubscriptionDestinationTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; -import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WebhookEventSubscriptionDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"WebHook\",\"properties\":{\"endpointUrl\":\"qktcmbjwzzo\",\"endpointBaseUrl\":\"pkybtgl\",\"maxEventsPerBatch\":493622397,\"preferredBatchSizeInKilobytes\":1743188022,\"azureActiveDirectoryTenantId\":\"jsqjcemqbm\",\"azureActiveDirectoryApplicationIdOrUri\":\"vqar\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"qreblui\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"bwxsfgtdm\"}],\"minimumTlsVersionAllowed\":\"1.1\"}}") - .toObject(WebhookEventSubscriptionDestination.class); - Assertions.assertEquals("qktcmbjwzzo", model.endpointUrl()); - Assertions.assertEquals(493622397, model.maxEventsPerBatch()); - Assertions.assertEquals(1743188022, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("jsqjcemqbm", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("vqar", model.azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("qreblui", model.deliveryAttributeMappings().get(0).name()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebhookEventSubscriptionDestination model - = new WebhookEventSubscriptionDestination().withEndpointUrl("qktcmbjwzzo") - .withMaxEventsPerBatch(493622397) - .withPreferredBatchSizeInKilobytes(1743188022) - .withAzureActiveDirectoryTenantId("jsqjcemqbm") - .withAzureActiveDirectoryApplicationIdOrUri("vqar") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("qreblui"), - new DeliveryAttributeMapping().withName("bwxsfgtdm"))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE); - model = BinaryData.fromObject(model).toObject(WebhookEventSubscriptionDestination.class); - Assertions.assertEquals("qktcmbjwzzo", model.endpointUrl()); - Assertions.assertEquals(493622397, model.maxEventsPerBatch()); - Assertions.assertEquals(1743188022, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("jsqjcemqbm", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("vqar", model.azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("qreblui", model.deliveryAttributeMappings().get(0).name()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookPartnerDestinationInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookPartnerDestinationInfoTests.java deleted file mode 100644 index a949d5b4ee06..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookPartnerDestinationInfoTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.PartnerClientAuthentication; -import com.azure.resourcemanager.eventgrid.models.ResourceMoveChangeHistory; -import com.azure.resourcemanager.eventgrid.models.WebhookPartnerDestinationInfo; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WebhookPartnerDestinationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookPartnerDestinationInfo model = BinaryData.fromString( - "{\"endpointType\":\"WebHook\",\"properties\":{\"endpointUrl\":\"mvrscmqerndbrny\",\"endpointBaseUrl\":\"fltfnnxr\",\"clientAuthentication\":{\"clientAuthenticationType\":\"PartnerClientAuthentication\"}},\"azureSubscriptionId\":\"jfynnfmuiiirip\",\"resourceGroupName\":\"hykfkxbb\",\"name\":\"r\",\"endpointServiceContext\":\"iutgnjizbeewoiy\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"bjuyrsrziuctixg\",\"resourceGroupName\":\"suif\",\"changedTimeUtc\":\"2021-11-02T13:42:42Z\"},{\"azureSubscriptionId\":\"aapezkiswqjmdghs\",\"resourceGroupName\":\"arybjufptbjc\",\"changedTimeUtc\":\"2021-10-20T14:38:43Z\"},{\"azureSubscriptionId\":\"iuiyqvldas\",\"resourceGroupName\":\"ppisqqzlgcndhzx\",\"changedTimeUtc\":\"2021-04-21T20:08:45Z\"}]}") - .toObject(WebhookPartnerDestinationInfo.class); - Assertions.assertEquals("jfynnfmuiiirip", model.azureSubscriptionId()); - Assertions.assertEquals("hykfkxbb", model.resourceGroupName()); - Assertions.assertEquals("r", model.name()); - Assertions.assertEquals("iutgnjizbeewoiy", model.endpointServiceContext()); - Assertions.assertEquals("bjuyrsrziuctixg", model.resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("suif", model.resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-02T13:42:42Z"), - model.resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("mvrscmqerndbrny", model.endpointUrl()); - Assertions.assertEquals("fltfnnxr", model.endpointBaseUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebhookPartnerDestinationInfo model - = new WebhookPartnerDestinationInfo().withAzureSubscriptionId("jfynnfmuiiirip") - .withResourceGroupName("hykfkxbb") - .withName("r") - .withEndpointServiceContext("iutgnjizbeewoiy") - .withResourceMoveChangeHistory(Arrays.asList( - new ResourceMoveChangeHistory().withAzureSubscriptionId("bjuyrsrziuctixg") - .withResourceGroupName("suif") - .withChangedTimeUtc(OffsetDateTime.parse("2021-11-02T13:42:42Z")), - new ResourceMoveChangeHistory().withAzureSubscriptionId("aapezkiswqjmdghs") - .withResourceGroupName("arybjufptbjc") - .withChangedTimeUtc(OffsetDateTime.parse("2021-10-20T14:38:43Z")), - new ResourceMoveChangeHistory().withAzureSubscriptionId("iuiyqvldas") - .withResourceGroupName("ppisqqzlgcndhzx") - .withChangedTimeUtc(OffsetDateTime.parse("2021-04-21T20:08:45Z")))) - .withEndpointUrl("mvrscmqerndbrny") - .withEndpointBaseUrl("fltfnnxr") - .withClientAuthentication(new PartnerClientAuthentication()); - model = BinaryData.fromObject(model).toObject(WebhookPartnerDestinationInfo.class); - Assertions.assertEquals("jfynnfmuiiirip", model.azureSubscriptionId()); - Assertions.assertEquals("hykfkxbb", model.resourceGroupName()); - Assertions.assertEquals("r", model.name()); - Assertions.assertEquals("iutgnjizbeewoiy", model.endpointServiceContext()); - Assertions.assertEquals("bjuyrsrziuctixg", model.resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("suif", model.resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-02T13:42:42Z"), - model.resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("mvrscmqerndbrny", model.endpointUrl()); - Assertions.assertEquals("fltfnnxr", model.endpointBaseUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookPartnerDestinationPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookPartnerDestinationPropertiesTests.java deleted file mode 100644 index 74a109a0cea2..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookPartnerDestinationPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.fluent.models.WebhookPartnerDestinationProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerClientAuthentication; -import org.junit.jupiter.api.Assertions; - -public final class WebhookPartnerDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookPartnerDestinationProperties model = BinaryData.fromString( - "{\"endpointUrl\":\"tuoqujlyegqavni\",\"endpointBaseUrl\":\"lqqbtnyjpylxdbfv\",\"clientAuthentication\":{\"clientAuthenticationType\":\"PartnerClientAuthentication\"}}") - .toObject(WebhookPartnerDestinationProperties.class); - Assertions.assertEquals("tuoqujlyegqavni", model.endpointUrl()); - Assertions.assertEquals("lqqbtnyjpylxdbfv", model.endpointBaseUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebhookPartnerDestinationProperties model - = new WebhookPartnerDestinationProperties().withEndpointUrl("tuoqujlyegqavni") - .withEndpointBaseUrl("lqqbtnyjpylxdbfv") - .withClientAuthentication(new PartnerClientAuthentication()); - model = BinaryData.fromObject(model).toObject(WebhookPartnerDestinationProperties.class); - Assertions.assertEquals("tuoqujlyegqavni", model.endpointUrl()); - Assertions.assertEquals("lqqbtnyjpylxdbfv", model.endpointBaseUrl()); - } -} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookUpdatePartnerDestinationInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookUpdatePartnerDestinationInfoTests.java deleted file mode 100644 index dc6a05f74727..000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookUpdatePartnerDestinationInfoTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.eventgrid.models.PartnerClientAuthentication; -import com.azure.resourcemanager.eventgrid.models.WebhookUpdatePartnerDestinationInfo; -import org.junit.jupiter.api.Assertions; - -public final class WebhookUpdatePartnerDestinationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookUpdatePartnerDestinationInfo model = BinaryData.fromString( - "{\"endpointType\":\"WebHook\",\"properties\":{\"endpointUrl\":\"srhkhgsnxuwwkpph\",\"endpointBaseUrl\":\"sbzxl\",\"clientAuthentication\":{\"clientAuthenticationType\":\"PartnerClientAuthentication\"}}}") - .toObject(WebhookUpdatePartnerDestinationInfo.class); - Assertions.assertEquals("srhkhgsnxuwwkpph", model.endpointUrl()); - Assertions.assertEquals("sbzxl", model.endpointBaseUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebhookUpdatePartnerDestinationInfo model - = new WebhookUpdatePartnerDestinationInfo().withEndpointUrl("srhkhgsnxuwwkpph") - .withEndpointBaseUrl("sbzxl") - .withClientAuthentication(new PartnerClientAuthentication()); - model = BinaryData.fromObject(model).toObject(WebhookUpdatePartnerDestinationInfo.class); - Assertions.assertEquals("srhkhgsnxuwwkpph", model.endpointUrl()); - Assertions.assertEquals("sbzxl", model.endpointBaseUrl()); - } -}