From 13825114603a0f244fef2ec7d2b0804f6c3c2065 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 21 Oct 2024 23:34:07 +0000 Subject: [PATCH] CodeGen from PR 31024 in Azure/azure-rest-api-specs Merge 09ce82f26c0c0df0466da7765c7c66255cb248a2 into de278c0e1b5bcfe706e5adb5b082e5a6fc9e4318 --- .../CHANGELOG.md | 981 +++++++++- .../azure-resourcemanager-eventgrid/README.md | 15 +- .../azure-resourcemanager-eventgrid/SAMPLE.md | 865 ++++++--- .../azure-resourcemanager-eventgrid/pom.xml | 3 +- .../eventgrid/EventGridManager.java | 16 +- ...PartnerClientAuthenticationProperties.java | 60 +- ...ventSubscriptionDestinationProperties.java | 66 +- .../fluent/models/CaCertificateInner.java | 101 +- .../models/CaCertificateProperties.java | 62 +- .../eventgrid/fluent/models/ChannelInner.java | 101 +- .../fluent/models/ChannelProperties.java | 84 +- .../ChannelUpdateParametersProperties.java | 65 +- .../fluent/models/ClientGroupInner.java | 101 +- .../fluent/models/ClientGroupProperties.java | 53 +- .../eventgrid/fluent/models/ClientInner.java | 101 +- .../fluent/models/ClientProperties.java | 69 +- ...mDomainOwnershipValidationResultInner.java | 59 +- .../DeliveryAttributeListResultInner.java | 48 +- .../eventgrid/fluent/models/DomainInner.java | 116 +- .../fluent/models/DomainProperties.java | 155 +- .../models/DomainSharedAccessKeysInner.java | 49 +- .../fluent/models/DomainTopicInner.java | 100 +- .../fluent/models/DomainTopicProperties.java | 45 +- .../DomainUpdateParameterProperties.java | 133 +- ...micDeliveryAttributeMappingProperties.java | 47 +- ...ventSubscriptionDestinationProperties.java | 55 +- .../models/EventSubscriptionFullUrlInner.java | 46 +- .../fluent/models/EventSubscriptionInner.java | 101 +- .../models/EventSubscriptionProperties.java | 117 +- .../fluent/models/EventTypeInner.java | 98 +- .../fluent/models/EventTypeProperties.java | 63 +- .../fluent/models/ExtensionTopicInner.java | 101 +- .../models/ExtensionTopicProperties.java | 49 +- ...ventSubscriptionDestinationProperties.java | 56 +- .../JsonInputSchemaMappingProperties.java | 66 +- ...ventSubscriptionDestinationProperties.java | 62 +- .../fluent/models/NamespaceInner.java | 118 +- .../fluent/models/NamespaceProperties.java | 98 +- .../NamespaceSharedAccessKeysInner.java | 50 +- ...ventSubscriptionDestinationProperties.java | 55 +- .../fluent/models/NamespaceTopicInner.java | 101 +- .../models/NamespaceTopicProperties.java | 57 +- ...mespaceTopicUpdateParameterProperties.java | 48 +- .../NamespaceUpdateParameterProperties.java | 75 +- ...rkSecurityPerimeterConfigurationInner.java | 96 +- ...erimeterConfigurationIssuesProperties.java | 72 +- ...urityPerimeterConfigurationProperties.java | 71 +- ...yPerimeterProfileAccessRuleProperties.java | 87 +- .../fluent/models/OperationInner.java | 61 +- .../models/PartnerConfigurationInner.java | 113 +- .../PartnerConfigurationProperties.java | 53 +- ...onfigurationUpdateParameterProperties.java | 51 +- .../models/PartnerDestinationInner.java | 108 +- .../models/PartnerDestinationProperties.java | 83 +- ...ventSubscriptionDestinationProperties.java | 47 +- .../fluent/models/PartnerNamespaceInner.java | 108 +- .../models/PartnerNamespaceProperties.java | 107 +- ...PartnerNamespaceSharedAccessKeysInner.java | 51 +- ...nerNamespaceUpdateParameterProperties.java | 78 +- .../models/PartnerRegistrationInner.java | 109 +- .../models/PartnerRegistrationProperties.java | 53 +- .../fluent/models/PartnerTopicInner.java | 112 +- .../fluent/models/PartnerTopicProperties.java | 87 +- .../fluent/models/PermissionBindingInner.java | 101 +- .../models/PermissionBindingProperties.java | 61 +- .../PrivateEndpointConnectionInner.java | 96 +- .../PrivateEndpointConnectionProperties.java | 63 +- .../models/PrivateLinkResourceInner.java | 58 +- .../models/PrivateLinkResourceProperties.java | 62 +- ...ventSubscriptionDestinationProperties.java | 56 +- ...ventSubscriptionDestinationProperties.java | 56 +- ...ticDeliveryAttributeMappingProperties.java | 52 +- ...geBlobDeadLetterDestinationProperties.java | 51 +- ...ventSubscriptionDestinationProperties.java | 63 +- .../models/SubscriptionFullUrlInner.java | 45 +- .../fluent/models/SubscriptionInner.java | 125 +- .../fluent/models/SubscriptionProperties.java | 99 +- ...ubscriptionUpdateParametersProperties.java | 99 +- .../fluent/models/SystemTopicInner.java | 112 +- .../fluent/models/SystemTopicProperties.java | 56 +- .../eventgrid/fluent/models/TopicInner.java | 124 +- .../fluent/models/TopicProperties.java | 111 +- .../models/TopicSharedAccessKeysInner.java | 49 +- .../fluent/models/TopicSpaceInner.java | 101 +- .../fluent/models/TopicSpaceProperties.java | 63 +- .../fluent/models/TopicTypeInfoInner.java | 94 +- .../fluent/models/TopicTypeProperties.java | 94 +- .../TopicUpdateParameterProperties.java | 87 +- .../fluent/models/VerifiedPartnerInner.java | 101 +- .../models/VerifiedPartnerProperties.java | 70 +- ...ventSubscriptionDestinationProperties.java | 91 +- .../WebhookPartnerDestinationProperties.java | 56 +- .../CaCertificatesClientImpl.java | 8 +- .../implementation/ChannelsClientImpl.java | 10 +- .../implementation/ChannelsImpl.java | 2 +- .../ClientGroupsClientImpl.java | 8 +- .../implementation/ClientsClientImpl.java | 8 +- .../DomainEventSubscriptionsClientImpl.java | 10 +- ...mainTopicEventSubscriptionsClientImpl.java | 10 +- .../DomainTopicsClientImpl.java | 8 +- .../implementation/DomainsClientImpl.java | 18 +- .../eventgrid/implementation/DomainsImpl.java | 2 +- .../EventGridManagementClientBuilder.java | 3 +- .../EventGridManagementClientImpl.java | 10 +- .../EventSubscriptionsClientImpl.java | 82 +- .../EventSubscriptionsImpl.java | 2 +- .../implementation/NamespaceImpl.java | 4 +- ...paceTopicEventSubscriptionsClientImpl.java | 10 +- .../NamespaceTopicsClientImpl.java | 10 +- .../implementation/NamespacesClientImpl.java | 18 +- .../implementation/NamespacesImpl.java | 2 +- .../PartnerConfigurationsClientImpl.java | 10 +- .../PartnerConfigurationsImpl.java | 2 +- .../PartnerDestinationsClientImpl.java | 18 +- .../PartnerNamespacesClientImpl.java | 18 +- .../implementation/PartnerNamespacesImpl.java | 2 +- .../PartnerRegistrationsClientImpl.java | 18 +- ...tnerTopicEventSubscriptionsClientImpl.java | 10 +- .../PartnerTopicsClientImpl.java | 18 +- .../PermissionBindingsClientImpl.java | 8 +- .../PrivateEndpointConnectionsClientImpl.java | 8 +- .../PrivateLinkResourcesClientImpl.java | 8 +- .../implementation/SubscriptionImpl.java | 21 + ...stemTopicEventSubscriptionsClientImpl.java | 10 +- .../SystemTopicsClientImpl.java | 18 +- .../TopicEventSubscriptionsClientImpl.java | 10 +- .../implementation/TopicSpacesClientImpl.java | 8 +- .../implementation/TopicsClientImpl.java | 18 +- .../eventgrid/implementation/TopicsImpl.java | 2 +- .../VerifiedPartnersClientImpl.java | 8 +- .../eventgrid/models/AdvancedFilter.java | 140 +- .../models/AdvancedFilterOperatorType.java | 2 - .../AlternativeAuthenticationNameSource.java | 2 - .../AzureADPartnerClientAuthentication.java | 61 +- ...eFunctionEventSubscriptionDestination.java | 60 +- .../models/BoolEqualsAdvancedFilter.java | 61 +- .../eventgrid/models/BoolEqualsFilter.java | 60 +- .../eventgrid/models/CaCertificate.java | 2 +- .../CaCertificateProvisioningState.java | 2 - .../models/CaCertificatesListResult.java | 50 +- .../eventgrid/models/Channel.java | 2 +- .../models/ChannelProvisioningState.java | 2 - .../eventgrid/models/ChannelType.java | 2 - .../models/ChannelUpdateParameters.java | 46 +- .../eventgrid/models/ChannelsListResult.java | 50 +- .../eventgrid/models/Client.java | 2 +- .../models/ClientAuthenticationSettings.java | 54 +- .../ClientCertificateAuthentication.java | 57 +- .../ClientCertificateValidationScheme.java | 2 - .../eventgrid/models/ClientGroup.java | 2 +- .../models/ClientGroupProvisioningState.java | 2 - .../models/ClientGroupsListResult.java | 50 +- .../models/ClientProvisioningState.java | 2 - .../eventgrid/models/ClientState.java | 2 - .../eventgrid/models/ClientsListResult.java | 50 +- .../eventgrid/models/ConnectionState.java | 53 +- .../models/CustomDomainConfiguration.java | 90 +- .../models/CustomDomainIdentity.java | 49 +- .../models/CustomDomainIdentityType.java | 2 - .../models/CustomDomainValidationState.java | 2 - ...ustomJwtAuthenticationManagedIdentity.java | 53 +- ...mJwtAuthenticationManagedIdentityType.java | 2 - .../CustomJwtAuthenticationSettings.java | 97 +- .../models/DataResidencyBoundary.java | 2 - .../models/DeadLetterDestination.java | 86 +- .../models/DeadLetterEndPointType.java | 2 - .../DeadLetterWithResourceIdentity.java | 54 +- .../models/DeliveryAttributeMapping.java | 94 +- .../models/DeliveryAttributeMappingType.java | 2 - .../models/DeliveryConfiguration.java | 59 +- .../eventgrid/models/DeliveryMode.java | 2 - .../eventgrid/models/DeliverySchema.java | 2 - .../models/DeliveryWithResourceIdentity.java | 53 +- .../eventgrid/models/Domain.java | 2 +- .../models/DomainProvisioningState.java | 2 - .../models/DomainRegenerateKeyRequest.java | 46 +- .../eventgrid/models/DomainTopic.java | 2 +- .../models/DomainTopicProvisioningState.java | 2 - .../models/DomainTopicsListResult.java | 50 +- .../models/DomainUpdateParameters.java | 61 +- .../eventgrid/models/DomainsListResult.java | 50 +- .../DynamicDeliveryAttributeMapping.java | 63 +- .../models/DynamicRoutingEnrichment.java | 49 +- .../models/EncodedIssuerCertificateInfo.java | 135 ++ .../eventgrid/models/EndpointType.java | 2 - .../eventgrid/models/EventDefinitionKind.java | 2 - .../eventgrid/models/EventDeliverySchema.java | 2 - .../EventHubEventSubscriptionDestination.java | 60 +- .../eventgrid/models/EventInputSchema.java | 2 - .../eventgrid/models/EventSubscription.java | 2 +- .../models/EventSubscriptionDestination.java | 113 +- .../models/EventSubscriptionFilter.java | 75 +- .../models/EventSubscriptionIdentity.java | 85 +- .../models/EventSubscriptionIdentityType.java | 2 - .../EventSubscriptionProvisioningState.java | 2 - .../EventSubscriptionUpdateParameters.java | 112 +- .../models/EventSubscriptionsListResult.java | 51 +- .../eventgrid/models/EventType.java | 2 +- .../eventgrid/models/EventTypeInfo.java | 60 +- .../models/EventTypesListResult.java | 46 +- .../eventgrid/models/ExtendedLocation.java | 49 +- .../eventgrid/models/ExtensionTopic.java | 2 +- .../FederatedIdentityCredentialInfo.java | 108 ++ .../eventgrid/models/Filter.java | 143 +- .../eventgrid/models/FilterOperatorType.java | 2 - .../models/FiltersConfiguration.java | 55 +- ...onnectionEventSubscriptionDestination.java | 60 +- .../eventgrid/models/IdentityInfo.java | 71 +- .../eventgrid/models/IdentityType.java | 2 - .../eventgrid/models/InboundIpRule.java | 49 +- .../models/InlineEventProperties.java | 57 +- .../eventgrid/models/InputSchema.java | 2 - .../eventgrid/models/InputSchemaMapping.java | 87 +- .../models/InputSchemaMappingType.java | 2 - .../eventgrid/models/IpActionType.java | 2 - .../models/IsNotNullAdvancedFilter.java | 57 +- .../eventgrid/models/IsNotNullFilter.java | 56 +- .../IsNullOrUndefinedAdvancedFilter.java | 58 +- .../models/IsNullOrUndefinedFilter.java | 57 +- .../models/IssuerCertificateInfo.java | 54 +- .../eventgrid/models/JsonField.java | 45 +- .../models/JsonFieldWithDefault.java | 52 +- .../models/JsonInputSchemaMapping.java | 60 +- ...itorAlertEventSubscriptionDestination.java | 60 +- .../models/MonitorAlertSeverity.java | 2 - .../eventgrid/models/Namespace.java | 2 +- .../models/NamespaceProvisioningState.java | 2 - .../models/NamespaceRegenerateKeyRequest.java | 47 +- .../eventgrid/models/NamespaceSku.java | 52 +- .../eventgrid/models/NamespaceTopic.java | 2 +- ...paceTopicEventSubscriptionDestination.java | 60 +- .../NamespaceTopicProvisioningState.java | 2 - .../NamespaceTopicUpdateParameters.java | 47 +- .../models/NamespaceTopicsListResult.java | 51 +- .../models/NamespaceUpdateParameters.java | 61 +- .../models/NamespacesListResult.java | 50 +- ...ecurityPerimeterAssociationAccessMode.java | 2 - ...urityPerimeterConfigProvisioningState.java | 2 - ...tyPerimeterConfigurationIssueSeverity.java | 2 - ...curityPerimeterConfigurationIssueType.java | 2 - ...kSecurityPerimeterConfigurationIssues.java | 52 +- ...orkSecurityPerimeterConfigurationList.java | 53 +- ...SecurityPerimeterConfigurationProfile.java | 69 +- .../models/NetworkSecurityPerimeterInfo.java | 53 +- ...orkSecurityPerimeterProfileAccessRule.java | 60 +- ...tyPerimeterProfileAccessRuleDirection.java | 2 - .../NetworkSecurityPerimeterResourceType.java | 2 - .../NetworkSecurityPerimeterSubscription.java | 47 +- .../NumberGreaterThanAdvancedFilter.java | 62 +- .../models/NumberGreaterThanFilter.java | 61 +- ...mberGreaterThanOrEqualsAdvancedFilter.java | 63 +- .../NumberGreaterThanOrEqualsFilter.java | 62 +- .../models/NumberInAdvancedFilter.java | 62 +- .../eventgrid/models/NumberInFilter.java | 57 +- .../models/NumberInRangeAdvancedFilter.java | 64 +- .../eventgrid/models/NumberInRangeFilter.java | 63 +- .../models/NumberLessThanAdvancedFilter.java | 61 +- .../models/NumberLessThanFilter.java | 60 +- .../NumberLessThanOrEqualsAdvancedFilter.java | 62 +- .../models/NumberLessThanOrEqualsFilter.java | 61 +- .../models/NumberNotInAdvancedFilter.java | 62 +- .../eventgrid/models/NumberNotInFilter.java | 61 +- .../NumberNotInRangeAdvancedFilter.java | 65 +- .../models/NumberNotInRangeFilter.java | 63 +- .../eventgrid/models/OperationInfo.java | 57 +- .../models/OperationsListResult.java | 46 +- .../eventgrid/models/Partner.java | 71 +- .../models/PartnerAuthorization.java | 55 +- .../models/PartnerClientAuthentication.java | 88 +- .../PartnerClientAuthenticationType.java | 2 - .../models/PartnerConfiguration.java | 2 +- ...PartnerConfigurationProvisioningState.java | 2 - .../PartnerConfigurationUpdateParameters.java | 55 +- .../PartnerConfigurationsListResult.java | 52 +- .../eventgrid/models/PartnerDestination.java | 2 +- .../PartnerDestinationActivationState.java | 2 - .../models/PartnerDestinationInfo.java | 109 +- .../PartnerDestinationProvisioningState.java | 2 - .../PartnerDestinationUpdateParameters.java | 49 +- .../models/PartnerDestinationsListResult.java | 52 +- .../eventgrid/models/PartnerDetails.java | 56 +- .../eventgrid/models/PartnerEndpointType.java | 2 - .../PartnerEventSubscriptionDestination.java | 60 +- .../eventgrid/models/PartnerNamespace.java | 2 +- .../PartnerNamespaceProvisioningState.java | 2 - .../PartnerNamespaceRegenerateKeyRequest.java | 48 +- .../PartnerNamespaceUpdateParameters.java | 54 +- .../models/PartnerNamespacesListResult.java | 51 +- .../eventgrid/models/PartnerRegistration.java | 2 +- .../PartnerRegistrationProvisioningState.java | 2 - .../PartnerRegistrationUpdateParameters.java | 50 +- .../PartnerRegistrationsListResult.java | 52 +- .../eventgrid/models/PartnerTopic.java | 2 +- .../models/PartnerTopicActivationState.java | 2 - .../eventgrid/models/PartnerTopicInfo.java | 64 +- .../models/PartnerTopicProvisioningState.java | 2 - .../models/PartnerTopicRoutingMode.java | 2 - .../models/PartnerTopicUpdateParameters.java | 52 +- .../models/PartnerTopicsListResult.java | 50 +- .../models/PartnerUpdateDestinationInfo.java | 86 +- .../models/PartnerUpdateTopicInfo.java | 45 +- .../eventgrid/models/PermissionBinding.java | 2 +- .../PermissionBindingProvisioningState.java | 2 - .../models/PermissionBindingsListResult.java | 51 +- .../eventgrid/models/PermissionType.java | 2 - .../models/PersistedConnectionStatus.java | 2 - .../eventgrid/models/PrivateEndpoint.java | 45 +- .../PrivateEndpointConnectionListResult.java | 53 +- .../PrivateEndpointConnectionsParentType.java | 2 - .../PrivateLinkResourcesListResult.java | 52 +- .../eventgrid/models/PublicNetworkAccess.java | 2 - .../eventgrid/models/PublisherType.java | 2 - .../eventgrid/models/PushInfo.java | 102 +- .../eventgrid/models/QueueInfo.java | 106 +- .../eventgrid/models/ReadinessState.java | 2 - .../eventgrid/models/ResourceAssociation.java | 50 +- .../eventgrid/models/ResourceKind.java | 2 - .../models/ResourceMoveChangeHistory.java | 57 +- .../models/ResourceProvisioningState.java | 2 - .../eventgrid/models/ResourceRegionType.java | 2 - .../eventgrid/models/ResourceSku.java | 45 +- .../eventgrid/models/RetryPolicy.java | 49 +- .../eventgrid/models/RoutingEnrichments.java | 53 +- .../eventgrid/models/RoutingIdentityInfo.java | 49 +- .../eventgrid/models/RoutingIdentityType.java | 2 - ...eBusQueueEventSubscriptionDestination.java | 60 +- ...eBusTopicEventSubscriptionDestination.java | 60 +- .../resourcemanager/eventgrid/models/Sku.java | 2 - .../eventgrid/models/SkuName.java | 2 - .../StaticDeliveryAttributeMapping.java | 63 +- .../models/StaticRoutingEnrichment.java | 90 +- .../models/StaticRoutingEnrichmentType.java | 2 - .../models/StaticStringRoutingEnrichment.java | 62 +- .../StorageBlobDeadLetterDestination.java | 60 +- ...rageQueueEventSubscriptionDestination.java | 60 +- .../StringBeginsWithAdvancedFilter.java | 63 +- .../models/StringBeginsWithFilter.java | 61 +- .../models/StringContainsAdvancedFilter.java | 62 +- .../models/StringContainsFilter.java | 61 +- .../models/StringEndsWithAdvancedFilter.java | 62 +- .../models/StringEndsWithFilter.java | 61 +- .../models/StringInAdvancedFilter.java | 62 +- .../eventgrid/models/StringInFilter.java | 57 +- .../StringNotBeginsWithAdvancedFilter.java | 63 +- .../models/StringNotBeginsWithFilter.java | 62 +- .../StringNotContainsAdvancedFilter.java | 63 +- .../models/StringNotContainsFilter.java | 62 +- .../StringNotEndsWithAdvancedFilter.java | 63 +- .../models/StringNotEndsWithFilter.java | 62 +- .../models/StringNotInAdvancedFilter.java | 62 +- .../eventgrid/models/StringNotInFilter.java | 61 +- .../eventgrid/models/Subscription.java | 45 +- .../models/SubscriptionProvisioningState.java | 2 - .../models/SubscriptionUpdateParameters.java | 70 +- .../models/SubscriptionsListResult.java | 50 +- .../eventgrid/models/SystemTopic.java | 2 +- .../models/SystemTopicUpdateParameters.java | 52 +- .../models/SystemTopicsListResult.java | 50 +- .../eventgrid/models/TlsVersion.java | 2 - .../eventgrid/models/Topic.java | 2 +- .../models/TopicProvisioningState.java | 2 - .../models/TopicRegenerateKeyRequest.java | 46 +- .../eventgrid/models/TopicSpace.java | 2 +- .../models/TopicSpaceProvisioningState.java | 2 - .../models/TopicSpacesConfiguration.java | 89 +- .../models/TopicSpacesConfigurationState.java | 2 - .../models/TopicSpacesListResult.java | 50 +- ...TopicTypeAdditionalEnforcedPermission.java | 52 +- .../models/TopicTypeProvisioningState.java | 2 - .../models/TopicTypeSourceScope.java | 2 - .../models/TopicTypesListResult.java | 46 +- .../models/TopicUpdateParameters.java | 60 +- .../eventgrid/models/TopicsConfiguration.java | 50 +- .../eventgrid/models/TopicsListResult.java | 50 +- .../UpdateTopicSpacesConfigurationInfo.java | 86 +- .../models/UpdateTopicsConfigurationInfo.java | 48 +- .../models/UserIdentityProperties.java | 49 +- .../eventgrid/models/VerifiedPartner.java | 2 +- .../VerifiedPartnerProvisioningState.java | 2 - .../models/VerifiedPartnersListResult.java | 51 +- .../WebhookEventSubscriptionDestination.java | 60 +- .../models/WebhookPartnerDestinationInfo.java | 81 +- .../WebhookUpdatePartnerDestinationInfo.java | 60 +- .../src/main/java/module-info.java | 8 +- .../proxy-config.json | 2 +- .../reflect-config.json | 1582 +---------------- .../CaCertificatesCreateOrUpdateSamples.java | 4 +- .../CaCertificatesDeleteSamples.java | 4 +- .../generated/CaCertificatesGetSamples.java | 4 +- .../CaCertificatesListByNamespaceSamples.java | 4 +- .../ChannelsCreateOrUpdateSamples.java | 4 +- .../generated/ChannelsDeleteSamples.java | 4 +- .../generated/ChannelsGetFullUrlSamples.java | 4 +- .../generated/ChannelsGetSamples.java | 4 +- ...ChannelsListByPartnerNamespaceSamples.java | 4 +- .../generated/ChannelsUpdateSamples.java | 4 +- .../ClientGroupsCreateOrUpdateSamples.java | 4 +- .../generated/ClientGroupsDeleteSamples.java | 4 +- .../generated/ClientGroupsGetSamples.java | 4 +- .../ClientGroupsListByNamespaceSamples.java | 4 +- .../ClientsCreateOrUpdateSamples.java | 4 +- .../generated/ClientsDeleteSamples.java | 4 +- .../generated/ClientsGetSamples.java | 3 +- .../ClientsListByNamespaceSamples.java | 4 +- ...entSubscriptionsCreateOrUpdateSamples.java | 4 +- ...DomainEventSubscriptionsDeleteSamples.java | 4 +- ...criptionsGetDeliveryAttributesSamples.java | 4 +- ...inEventSubscriptionsGetFullUrlSamples.java | 4 +- .../DomainEventSubscriptionsGetSamples.java | 4 +- .../DomainEventSubscriptionsListSamples.java | 4 +- ...DomainEventSubscriptionsUpdateSamples.java | 4 +- ...entSubscriptionsCreateOrUpdateSamples.java | 4 +- ...nTopicEventSubscriptionsDeleteSamples.java | 4 +- ...criptionsGetDeliveryAttributesSamples.java | 4 +- ...icEventSubscriptionsGetFullUrlSamples.java | 4 +- ...mainTopicEventSubscriptionsGetSamples.java | 4 +- ...ainTopicEventSubscriptionsListSamples.java | 4 +- ...nTopicEventSubscriptionsUpdateSamples.java | 4 +- .../DomainTopicsCreateOrUpdateSamples.java | 4 +- .../generated/DomainTopicsDeleteSamples.java | 4 +- .../generated/DomainTopicsGetSamples.java | 4 +- .../DomainTopicsListByDomainSamples.java | 4 +- .../DomainsCreateOrUpdateSamples.java | 4 +- .../generated/DomainsDeleteSamples.java | 4 +- .../DomainsGetByResourceGroupSamples.java | 3 +- .../DomainsListByResourceGroupSamples.java | 4 +- .../generated/DomainsListSamples.java | 4 +- .../DomainsListSharedAccessKeysSamples.java | 4 +- .../DomainsRegenerateKeySamples.java | 4 +- .../generated/DomainsUpdateSamples.java | 4 +- ...entSubscriptionsCreateOrUpdateSamples.java | 44 +- .../EventSubscriptionsDeleteSamples.java | 16 +- ...criptionsGetDeliveryAttributesSamples.java | 4 +- .../EventSubscriptionsGetFullUrlSamples.java | 16 +- .../EventSubscriptionsGetSamples.java | 44 +- ...SubscriptionsListByDomainTopicSamples.java | 4 +- ...bscriptionsListByResourceGroupSamples.java | 4 +- ...entSubscriptionsListByResourceSamples.java | 4 +- ...balByResourceGroupForTopicTypeSamples.java | 4 +- ...obalBySubscriptionForTopicTypeSamples.java | 4 +- ...nalByResourceGroupForTopicTypeSamples.java | 4 +- ...onsListRegionalByResourceGroupSamples.java | 4 +- ...onalBySubscriptionForTopicTypeSamples.java | 4 +- ...ionsListRegionalBySubscriptionSamples.java | 4 +- .../EventSubscriptionsListSamples.java | 4 +- .../EventSubscriptionsUpdateSamples.java | 44 +- .../generated/ExtensionTopicsGetSamples.java | 4 +- ...entSubscriptionsCreateOrUpdateSamples.java | 4 +- ...eTopicEventSubscriptionsDeleteSamples.java | 4 +- ...criptionsGetDeliveryAttributesSamples.java | 4 +- ...icEventSubscriptionsGetFullUrlSamples.java | 4 +- ...paceTopicEventSubscriptionsGetSamples.java | 4 +- ...scriptionsListByNamespaceTopicSamples.java | 4 +- ...eTopicEventSubscriptionsUpdateSamples.java | 4 +- .../NamespaceTopicsCreateOrUpdateSamples.java | 4 +- .../NamespaceTopicsDeleteSamples.java | 4 +- .../generated/NamespaceTopicsGetSamples.java | 4 +- ...NamespaceTopicsListByNamespaceSamples.java | 4 +- ...paceTopicsListSharedAccessKeysSamples.java | 4 +- .../NamespaceTopicsRegenerateKeySamples.java | 4 +- .../NamespaceTopicsUpdateSamples.java | 4 +- .../NamespacesCreateOrUpdateSamples.java | 4 +- .../generated/NamespacesDeleteSamples.java | 4 +- .../NamespacesGetByResourceGroupSamples.java | 4 +- .../NamespacesListByResourceGroupSamples.java | 4 +- .../generated/NamespacesListSamples.java | 4 +- ...NamespacesListSharedAccessKeysSamples.java | 4 +- .../NamespacesRegenerateKeySamples.java | 4 +- .../generated/NamespacesUpdateSamples.java | 4 +- ...sValidateCustomDomainOwnershipSamples.java | 4 +- ...rityPerimeterConfigurationsGetSamples.java | 4 +- ...ityPerimeterConfigurationsListSamples.java | 4 +- ...rimeterConfigurationsReconcileSamples.java | 4 +- .../generated/OperationsListSamples.java | 4 +- ...ConfigurationsAuthorizePartnerSamples.java | 4 +- ...erConfigurationsCreateOrUpdateSamples.java | 4 +- .../PartnerConfigurationsDeleteSamples.java | 4 +- ...nfigurationsGetByResourceGroupSamples.java | 4 +- ...figurationsListByResourceGroupSamples.java | 4 +- .../PartnerConfigurationsListSamples.java | 4 +- ...nfigurationsUnauthorizePartnerSamples.java | 4 +- .../PartnerConfigurationsUpdateSamples.java | 4 +- .../PartnerDestinationsActivateSamples.java | 4 +- ...tnerDestinationsCreateOrUpdateSamples.java | 4 +- .../PartnerDestinationsDeleteSamples.java | 4 +- ...DestinationsGetByResourceGroupSamples.java | 4 +- ...estinationsListByResourceGroupSamples.java | 4 +- .../PartnerDestinationsListSamples.java | 4 +- .../PartnerDestinationsUpdateSamples.java | 4 +- ...artnerNamespacesCreateOrUpdateSamples.java | 4 +- .../PartnerNamespacesDeleteSamples.java | 4 +- ...erNamespacesGetByResourceGroupSamples.java | 4 +- ...rNamespacesListByResourceGroupSamples.java | 4 +- .../PartnerNamespacesListSamples.java | 4 +- ...NamespacesListSharedAccessKeysSamples.java | 4 +- ...PartnerNamespacesRegenerateKeySamples.java | 4 +- .../PartnerNamespacesUpdateSamples.java | 4 +- ...nerRegistrationsCreateOrUpdateSamples.java | 4 +- .../PartnerRegistrationsDeleteSamples.java | 4 +- ...egistrationsGetByResourceGroupSamples.java | 4 +- ...gistrationsListByResourceGroupSamples.java | 4 +- .../PartnerRegistrationsListSamples.java | 4 +- .../PartnerRegistrationsUpdateSamples.java | 4 +- ...entSubscriptionsCreateOrUpdateSamples.java | 4 +- ...rTopicEventSubscriptionsDeleteSamples.java | 4 +- ...criptionsGetDeliveryAttributesSamples.java | 4 +- ...icEventSubscriptionsGetFullUrlSamples.java | 4 +- ...tnerTopicEventSubscriptionsGetSamples.java | 4 +- ...ubscriptionsListByPartnerTopicSamples.java | 4 +- ...rTopicEventSubscriptionsUpdateSamples.java | 4 +- .../PartnerTopicsActivateSamples.java | 4 +- .../PartnerTopicsCreateOrUpdateSamples.java | 4 +- .../PartnerTopicsDeactivateSamples.java | 4 +- .../generated/PartnerTopicsDeleteSamples.java | 4 +- ...artnerTopicsGetByResourceGroupSamples.java | 4 +- ...rtnerTopicsListByResourceGroupSamples.java | 4 +- .../generated/PartnerTopicsListSamples.java | 4 +- .../generated/PartnerTopicsUpdateSamples.java | 4 +- ...rmissionBindingsCreateOrUpdateSamples.java | 4 +- .../PermissionBindingsDeleteSamples.java | 4 +- .../PermissionBindingsGetSamples.java | 4 +- ...missionBindingsListByNamespaceSamples.java | 4 +- ...ivateEndpointConnectionsDeleteSamples.java | 4 +- .../PrivateEndpointConnectionsGetSamples.java | 4 +- ...pointConnectionsListByResourceSamples.java | 4 +- ...ivateEndpointConnectionsUpdateSamples.java | 4 +- .../PrivateLinkResourcesGetSamples.java | 4 +- ...ateLinkResourcesListByResourceSamples.java | 4 +- ...entSubscriptionsCreateOrUpdateSamples.java | 4 +- ...mTopicEventSubscriptionsDeleteSamples.java | 4 +- ...criptionsGetDeliveryAttributesSamples.java | 4 +- ...icEventSubscriptionsGetFullUrlSamples.java | 4 +- ...stemTopicEventSubscriptionsGetSamples.java | 4 +- ...SubscriptionsListBySystemTopicSamples.java | 4 +- ...mTopicEventSubscriptionsUpdateSamples.java | 4 +- .../SystemTopicsCreateOrUpdateSamples.java | 4 +- .../generated/SystemTopicsDeleteSamples.java | 4 +- ...SystemTopicsGetByResourceGroupSamples.java | 4 +- ...ystemTopicsListByResourceGroupSamples.java | 4 +- .../generated/SystemTopicsListSamples.java | 4 +- .../generated/SystemTopicsUpdateSamples.java | 4 +- ...entSubscriptionsCreateOrUpdateSamples.java | 4 +- .../TopicEventSubscriptionsDeleteSamples.java | 4 +- ...criptionsGetDeliveryAttributesSamples.java | 4 +- ...icEventSubscriptionsGetFullUrlSamples.java | 4 +- .../TopicEventSubscriptionsGetSamples.java | 4 +- .../TopicEventSubscriptionsListSamples.java | 4 +- .../TopicEventSubscriptionsUpdateSamples.java | 4 +- .../TopicSpacesCreateOrUpdateSamples.java | 4 +- .../generated/TopicSpacesDeleteSamples.java | 4 +- .../generated/TopicSpacesGetSamples.java | 4 +- .../TopicSpacesListByNamespaceSamples.java | 4 +- .../generated/TopicTypesGetSamples.java | 4 +- .../TopicTypesListEventTypesSamples.java | 4 +- .../generated/TopicTypesListSamples.java | 4 +- .../TopicsCreateOrUpdateSamples.java | 8 +- .../generated/TopicsDeleteSamples.java | 4 +- .../TopicsGetByResourceGroupSamples.java | 3 +- .../TopicsListByResourceGroupSamples.java | 4 +- .../TopicsListEventTypesSamples.java | 4 +- .../generated/TopicsListSamples.java | 4 +- .../TopicsListSharedAccessKeysSamples.java | 4 +- .../generated/TopicsRegenerateKeySamples.java | 4 +- .../generated/TopicsUpdateSamples.java | 4 +- .../generated/VerifiedPartnersGetSamples.java | 4 +- .../VerifiedPartnersListSamples.java | 4 +- ...erClientAuthenticationPropertiesTests.java | 30 - ...ureADPartnerClientAuthenticationTests.java | 30 - ...ubscriptionDestinationPropertiesTests.java | 40 - ...tionEventSubscriptionDestinationTests.java | 41 - .../CaCertificatesDeleteMockTests.java | 33 - .../generated/ChannelInnerTests.java | 127 -- .../generated/ChannelPropertiesTests.java | 141 -- ...hannelUpdateParametersPropertiesTests.java | 89 - .../ChannelUpdateParametersTests.java | 79 - ...lsCreateOrUpdateWithResponseMockTests.java | 103 -- .../generated/ChannelsDeleteMockTests.java | 33 - ...annelsGetFullUrlWithResponseMockTests.java | 38 - .../ChannelsGetWithResponseMockTests.java | 64 - ...annelsListByPartnerNamespaceMockTests.java | 70 - .../generated/ChannelsListResultTests.java | 106 -- .../ChannelsUpdateWithResponseMockTests.java | 61 - .../ClientCertificateAuthenticationTests.java | 32 - .../generated/ClientGroupInnerTests.java | 28 - .../generated/ClientGroupPropertiesTests.java | 28 - .../ClientGroupsCreateOrUpdateMockTests.java | 43 - .../ClientGroupsDeleteMockTests.java | 33 - .../ClientGroupsGetWithResponseMockTests.java | 40 - .../ClientGroupsListByNamespaceMockTests.java | 41 - .../ClientGroupsListResultTests.java | 38 - .../eventgrid/generated/ClientInnerTests.java | 61 - .../generated/ClientPropertiesTests.java | 60 - .../ClientsCreateOrUpdateMockTests.java | 71 - .../generated/ClientsDeleteMockTests.java | 33 - .../ClientsGetWithResponseMockTests.java | 47 - .../ClientsListByNamespaceMockTests.java | 48 - .../generated/ClientsListResultTests.java | 94 - .../generated/ConnectionStateTests.java | 33 - .../CustomDomainConfigurationTests.java | 47 - .../generated/CustomDomainIdentityTests.java | 30 - ...inOwnershipValidationResultInnerTests.java | 100 -- ...JwtAuthenticationManagedIdentityTests.java | 31 - .../generated/DeadLetterDestinationTests.java | 22 - .../DeadLetterWithResourceIdentityTests.java | 34 - ...DeliveryAttributeListResultInnerTests.java | 29 - .../DeliveryAttributeMappingTests.java | 26 - .../generated/DeliveryConfigurationTests.java | 89 - .../DeliveryWithResourceIdentityTests.java | 34 - ...mainEventSubscriptionsDeleteMockTests.java | 34 - ...liveryAttributesWithResponseMockTests.java | 39 - ...ptionsGetFullUrlWithResponseMockTests.java | 38 - .../eventgrid/generated/DomainInnerTests.java | 147 -- .../generated/DomainPropertiesTests.java | 109 -- ...opicEventSubscriptionsDeleteMockTests.java | 33 - ...liveryAttributesWithResponseMockTests.java | 40 - ...ptionsGetFullUrlWithResponseMockTests.java | 39 - .../generated/DomainTopicInnerTests.java | 23 - .../generated/DomainTopicPropertiesTests.java | 22 - .../DomainTopicsDeleteMockTests.java | 33 - .../DomainTopicsGetWithResponseMockTests.java | 37 - .../DomainTopicsListByDomainMockTests.java | 37 - .../DomainTopicsListResultTests.java | 29 - .../DomainUpdateParameterPropertiesTests.java | 106 -- .../DomainUpdateParametersTests.java | 130 -- .../generated/DomainsDeleteMockTests.java | 33 - ...tByResourceGroupWithResponseMockTests.java | 73 - .../DomainsListByResourceGroupMockTests.java | 75 - .../generated/DomainsListMockTests.java | 74 - .../generated/DomainsListResultTests.java | 201 --- ...liveryAttributeMappingPropertiesTests.java | 26 - .../DynamicDeliveryAttributeMappingTests.java | 29 - ...ubscriptionDestinationPropertiesTests.java | 32 - ...tHubEventSubscriptionDestinationTests.java | 35 - .../EventSubscriptionDestinationTests.java | 23 - .../EventSubscriptionFullUrlInnerTests.java | 25 - .../EventSubscriptionIdentityTests.java | 31 - .../EventSubscriptionsDeleteMockTests.java | 33 - ...liveryAttributesWithResponseMockTests.java | 39 - ...ptionsGetFullUrlWithResponseMockTests.java | 38 - .../EventSubscriptionsListResultTests.java | 102 -- .../generated/EventTypeInfoTests.java | 60 - .../generated/EventTypeInnerTests.java | 35 - .../generated/EventTypePropertiesTests.java | 35 - .../generated/EventTypesListResultTests.java | 50 - .../generated/ExtendedLocationTests.java | 27 - .../generated/ExtensionTopicInnerTests.java | 28 - .../ExtensionTopicPropertiesTests.java | 29 - ...tensionTopicsGetWithResponseMockTests.java | 39 - ...ubscriptionDestinationPropertiesTests.java | 34 - ...tionEventSubscriptionDestinationTests.java | 34 - .../generated/IdentityInfoTests.java | 55 - .../generated/InboundIpRuleTests.java | 28 - .../generated/InlineEventPropertiesTests.java | 35 - .../generated/InputSchemaMappingTests.java | 22 - .../generated/IssuerCertificateInfoTests.java | 35 - .../eventgrid/generated/JsonFieldTests.java | 24 - .../generated/JsonFieldWithDefaultTests.java | 27 - ...JsonInputSchemaMappingPropertiesTests.java | 50 - .../JsonInputSchemaMappingTests.java | 51 - ...ubscriptionDestinationPropertiesTests.java | 35 - ...lertEventSubscriptionDestinationTests.java | 35 - .../generated/NamespaceSkuTests.java | 28 - ...ubscriptionDestinationPropertiesTests.java | 27 - ...opicEventSubscriptionDestinationTests.java | 27 - ...opicEventSubscriptionsDeleteMockTests.java | 34 - ...liveryAttributesWithResponseMockTests.java | 39 - ...ptionsGetFullUrlWithResponseMockTests.java | 38 - .../generated/NamespaceTopicInnerTests.java | 34 - .../NamespaceTopicPropertiesTests.java | 34 - ...ceTopicUpdateParameterPropertiesTests.java | 26 - .../NamespaceTopicUpdateParametersTests.java | 26 - ...amespaceTopicsCreateOrUpdateMockTests.java | 47 - .../NamespaceTopicsDeleteMockTests.java | 33 - ...mespaceTopicsGetWithResponseMockTests.java | 43 - ...mespaceTopicsListByNamespaceMockTests.java | 43 - .../NamespaceTopicsListResultTests.java | 43 - .../generated/NamespacesDeleteMockTests.java | 33 - .../generated/NamespacesListResultTests.java | 274 --- ...alidateCustomDomainOwnershipMockTests.java | 65 - ...urityPerimeterConfigurationInnerTests.java | 176 -- ...terConfigurationIssuesPropertiesTests.java | 45 - ...rityPerimeterConfigurationIssuesTests.java | 45 - ...curityPerimeterConfigurationListTests.java | 79 - ...ityPerimeterConfigurationProfileTests.java | 104 -- ...PerimeterConfigurationPropertiesTests.java | 141 -- ...onfigurationsGetWithResponseMockTests.java | 66 - ...yPerimeterConfigurationsListMockTests.java | 70 - ...meterConfigurationsReconcileMockTests.java | 66 - .../NetworkSecurityPerimeterInfoTests.java | 32 - ...meterProfileAccessRulePropertiesTests.java | 67 - ...curityPerimeterProfileAccessRuleTests.java | 66 - ...orkSecurityPerimeterSubscriptionTests.java | 25 - .../generated/OperationInfoTests.java | 36 - .../generated/OperationInnerTests.java | 46 - .../generated/OperationsListMockTests.java | 44 - .../generated/OperationsListResultTests.java | 57 - .../PartnerClientAuthenticationTests.java | 23 - ...urationUpdateParameterPropertiesTests.java | 27 - ...nerConfigurationUpdateParametersTests.java | 46 - .../PartnerConfigurationsDeleteMockTests.java | 33 - .../PartnerDestinationInfoTests.java | 50 - .../PartnerDestinationInnerTests.java | 67 - .../PartnerDestinationPropertiesTests.java | 47 - ...rtnerDestinationUpdateParametersTests.java | 42 - ...inationsActivateWithResponseMockTests.java | 50 - ...erDestinationsCreateOrUpdateMockTests.java | 73 - .../PartnerDestinationsDeleteMockTests.java | 33 - ...tByResourceGroupWithResponseMockTests.java | 50 - ...tinationsListByResourceGroupMockTests.java | 51 - .../PartnerDestinationsListMockTests.java | 51 - .../PartnerDestinationsListResultTests.java | 99 -- .../generated/PartnerDetailsTests.java | 31 - ...ubscriptionDestinationPropertiesTests.java | 26 - ...tnerEventSubscriptionDestinationTests.java | 27 - .../generated/PartnerNamespaceInnerTests.java | 70 - .../PartnerNamespacePropertiesTests.java | 50 - ...mespaceUpdateParameterPropertiesTests.java | 44 - ...PartnerNamespaceUpdateParametersTests.java | 62 - .../PartnerNamespacesDeleteMockTests.java | 33 - ...tByResourceGroupWithResponseMockTests.java | 51 - ...amespacesListByResourceGroupMockTests.java | 53 - .../PartnerNamespacesListMockTests.java | 53 - .../PartnerNamespacesListResultTests.java | 114 -- .../PartnerRegistrationInnerTests.java | 49 - .../PartnerRegistrationPropertiesTests.java | 30 - ...tnerRegistrationUpdateParametersTests.java | 40 - ...rRegistrationsCreateOrUpdateMockTests.java | 61 - .../PartnerRegistrationsDeleteMockTests.java | 33 - ...tByResourceGroupWithResponseMockTests.java | 43 - ...strationsListByResourceGroupMockTests.java | 43 - .../PartnerRegistrationsListMockTests.java | 43 - .../PartnerRegistrationsListResultTests.java | 55 - ...opicEventSubscriptionsDeleteMockTests.java | 34 - ...liveryAttributesWithResponseMockTests.java | 38 - ...ptionsGetFullUrlWithResponseMockTests.java | 38 - .../generated/PartnerTopicInfoTests.java | 85 - .../generated/PartnerTopicInnerTests.java | 114 -- .../PartnerTopicPropertiesTests.java | 80 - .../PartnerTopicUpdateParametersTests.java | 63 - ...erTopicsActivateWithResponseMockTests.java | 64 - ...csCreateOrUpdateWithResponseMockTests.java | 106 -- ...TopicsDeactivateWithResponseMockTests.java | 66 - .../PartnerTopicsDeleteMockTests.java | 33 - ...tByResourceGroupWithResponseMockTests.java | 67 - ...nerTopicsListByResourceGroupMockTests.java | 68 - .../generated/PartnerTopicsListMockTests.java | 70 - .../PartnerTopicsListResultTests.java | 106 -- .../PartnerUpdateDestinationInfoTests.java | 23 - .../PartnerUpdateTopicInfoTests.java | 63 - .../PermissionBindingInnerTests.java | 36 - .../PermissionBindingPropertiesTests.java | 36 - ...issionBindingsCreateOrUpdateMockTests.java | 48 - .../PermissionBindingsDeleteMockTests.java | 34 - ...ssionBindingsGetWithResponseMockTests.java | 43 - ...ssionBindingsListByNamespaceMockTests.java | 43 - .../PermissionBindingsListResultTests.java | 42 - .../PrivateEndpointConnectionInnerTests.java | 47 - ...vateEndpointConnectionListResultTests.java | 80 - ...vateEndpointConnectionPropertiesTests.java | 47 - ...ntConnectionsGetWithResponseMockTests.java | 49 - ...intConnectionsListByResourceMockTests.java | 51 - ...ateEndpointConnectionsUpdateMockTests.java | 59 - .../generated/PrivateEndpointTests.java | 24 - .../PrivateLinkResourceInnerTests.java | 45 - .../PrivateLinkResourcePropertiesTests.java | 36 - ...LinkResourcesGetWithResponseMockTests.java | 45 - ...eLinkResourcesListByResourceMockTests.java | 46 - .../PrivateLinkResourcesListResultTests.java | 64 - .../eventgrid/generated/PushInfoTests.java | 62 - .../eventgrid/generated/QueueInfoTests.java | 52 - .../generated/ResourceAssociationTests.java | 29 - .../ResourceMoveChangeHistoryTests.java | 33 - .../eventgrid/generated/ResourceSkuTests.java | 25 - .../eventgrid/generated/RetryPolicyTests.java | 29 - .../generated/RoutingIdentityInfoTests.java | 30 - ...ubscriptionDestinationPropertiesTests.java | 33 - ...ueueEventSubscriptionDestinationTests.java | 33 - ...ubscriptionDestinationPropertiesTests.java | 34 - ...opicEventSubscriptionDestinationTests.java | 32 - ...bDeadLetterDestinationPropertiesTests.java | 29 - ...StorageBlobDeadLetterDestinationTests.java | 29 - ...ubscriptionDestinationPropertiesTests.java | 33 - ...ueueEventSubscriptionDestinationTests.java | 33 - .../SubscriptionFullUrlInnerTests.java | 25 - .../SubscriptionsListResultTests.java | 88 - ...opicEventSubscriptionsDeleteMockTests.java | 33 - ...liveryAttributesWithResponseMockTests.java | 39 - ...ptionsGetFullUrlWithResponseMockTests.java | 38 - .../generated/SystemTopicInnerTests.java | 70 - .../generated/SystemTopicPropertiesTests.java | 28 - .../SystemTopicUpdateParametersTests.java | 66 - .../SystemTopicsCreateOrUpdateMockTests.java | 74 - .../SystemTopicsDeleteMockTests.java | 33 - ...tByResourceGroupWithResponseMockTests.java | 48 - ...temTopicsListByResourceGroupMockTests.java | 50 - .../generated/SystemTopicsListMockTests.java | 50 - .../SystemTopicsListResultTests.java | 90 - ...opicEventSubscriptionsDeleteMockTests.java | 34 - ...liveryAttributesWithResponseMockTests.java | 40 - ...ptionsGetFullUrlWithResponseMockTests.java | 38 - .../eventgrid/generated/TopicInnerTests.java | 147 -- .../generated/TopicPropertiesTests.java | 99 -- .../generated/TopicSpaceInnerTests.java | 30 - .../generated/TopicSpacePropertiesTests.java | 30 - .../TopicSpacesCreateOrUpdateMockTests.java | 44 - .../generated/TopicSpacesDeleteMockTests.java | 33 - .../TopicSpacesGetWithResponseMockTests.java | 40 - .../TopicSpacesListByNamespaceMockTests.java | 40 - .../generated/TopicSpacesListResultTests.java | 41 - ...TypeAdditionalEnforcedPermissionTests.java | 29 - .../generated/TopicTypeInfoInnerTests.java | 61 - .../generated/TopicTypePropertiesTests.java | 62 - .../TopicTypesGetWithResponseMockTests.java | 50 - .../TopicTypesListEventTypesMockTests.java | 42 - .../generated/TopicTypesListMockTests.java | 53 - .../generated/TopicTypesListResultTests.java | 71 - .../TopicUpdateParameterPropertiesTests.java | 93 - .../generated/TopicUpdateParametersTests.java | 125 -- .../generated/TopicsConfigurationTests.java | 50 - ...tByResourceGroupWithResponseMockTests.java | 73 - .../TopicsListByResourceGroupMockTests.java | 78 - .../TopicsListEventTypesMockTests.java | 43 - .../generated/TopicsListMockTests.java | 76 - .../generated/TopicsListResultTests.java | 179 -- .../UpdateTopicsConfigurationInfoTests.java | 68 - .../UserIdentityPropertiesTests.java | 27 - .../generated/VerifiedPartnerInnerTests.java | 59 - .../VerifiedPartnerPropertiesTests.java | 59 - ...ifiedPartnersGetWithResponseMockTests.java | 50 - .../VerifiedPartnersListMockTests.java | 53 - .../VerifiedPartnersListResultTests.java | 83 - ...ubscriptionDestinationPropertiesTests.java | 49 - ...hookEventSubscriptionDestinationTests.java | 49 - .../WebhookPartnerDestinationInfoTests.java | 65 - ...hookPartnerDestinationPropertiesTests.java | 32 - ...hookUpdatePartnerDestinationInfoTests.java | 32 - 836 files changed, 17170 insertions(+), 18788 deletions(-) create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EncodedIssuerCertificateInfo.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FederatedIdentityCredentialInfo.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureADPartnerClientAuthenticationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureADPartnerClientAuthenticationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureFunctionEventSubscriptionDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AzureFunctionEventSubscriptionDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelUpdateParametersPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelUpdateParametersTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientCertificateAuthenticationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsCreateOrUpdateMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListByNamespaceMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsCreateOrUpdateMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsListByNamespaceMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ClientsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ConnectionStateTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainConfigurationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainIdentityTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomDomainOwnershipValidationResultInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomJwtAuthenticationManagedIdentityTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeadLetterDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeadLetterWithResourceIdentityTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryAttributeListResultInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryAttributeMappingTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryConfigurationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DeliveryWithResourceIdentityTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainUpdateParameterPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainUpdateParametersTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DomainsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DynamicDeliveryAttributeMappingPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/DynamicDeliveryAttributeMappingTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventHubEventSubscriptionDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventHubEventSubscriptionDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionFullUrlInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionIdentityTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypeInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypeInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypePropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/EventTypesListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtendedLocationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/HybridConnectionEventSubscriptionDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/HybridConnectionEventSubscriptionDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/IdentityInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InboundIpRuleTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InlineEventPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/InputSchemaMappingTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/IssuerCertificateInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonFieldTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonFieldWithDefaultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonInputSchemaMappingPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/JsonInputSchemaMappingTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/MonitorAlertEventSubscriptionDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/MonitorAlertEventSubscriptionDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceSkuTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicUpdateParameterPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicUpdateParametersTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsCreateOrUpdateMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListByNamespaceMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NamespacesValidateCustomDomainOwnershipMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationIssuesPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationIssuesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationListTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationProfileTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterProfileAccessRulePropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterProfileAccessRuleTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/NetworkSecurityPerimeterSubscriptionTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationsListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/OperationsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerClientAuthenticationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationUpdateParameterPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationUpdateParametersTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationUpdateParametersTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsActivateWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsCreateOrUpdateMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListByResourceGroupMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerDetailsTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerEventSubscriptionDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerEventSubscriptionDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacePropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceUpdateParameterPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespaceUpdateParametersTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationUpdateParametersTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicUpdateParametersTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerUpdateDestinationInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PartnerUpdateTopicInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsCreateOrUpdateMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListByNamespaceMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourceInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PushInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/QueueInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceAssociationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceMoveChangeHistoryTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ResourceSkuTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/RetryPolicyTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/RoutingIdentityInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusQueueEventSubscriptionDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusQueueEventSubscriptionDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusTopicEventSubscriptionDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ServiceBusTopicEventSubscriptionDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageBlobDeadLetterDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageBlobDeadLetterDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageQueueEventSubscriptionDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/StorageQueueEventSubscriptionDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SubscriptionFullUrlInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SubscriptionsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicUpdateParametersTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpaceInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacePropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesCreateOrUpdateMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesDeleteMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListByNamespaceMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypeAdditionalEnforcedPermissionTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypeInfoInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypePropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicUpdateParameterPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicUpdateParametersTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsConfigurationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/UpdateTopicsConfigurationInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/UserIdentityPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnerInnerTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnerPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetWithResponseMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListResultTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookEventSubscriptionDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookEventSubscriptionDestinationTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookPartnerDestinationInfoTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookPartnerDestinationPropertiesTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookUpdatePartnerDestinationInfoTests.java diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md index c81bba3ae89a8..d7e6ec50d5a5e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md @@ -1,14 +1,987 @@ # Release History -## 1.2.0-beta.7 (Unreleased) +## 1.0.0-beta.1 (2024-10-21) -### 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-2024-12-preview. 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 +* `deleteById(java.lang.String)` was removed +* `getById(java.lang.String)` was removed +* `define(java.lang.String)` was removed +* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed + +### Features Added + +* `models.PermissionBinding$DefinitionStages` was added + +* `models.PartnerDestinationInfo` was added + +* `models.PartnerUpdateDestinationInfo` 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.Sku` 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.NetworkSecurityPerimeterConfigurationIssueSeverity` 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.PartnerDestination$Definition` was added + +* `models.PartnerTopic$Definition` was added + +* `models.DataResidencyBoundary` was added + +* `models.StringContainsFilter` was added + +* `models.Filter` was added + +* `models.ResourceSku` was added + +* `models.SubscriptionsListResult` was added + +* `models.ResourceKind` was added + +* `models.NamespaceTopicsListResult` was added + +* `models.NamespaceTopic$Update` was added + +* `models.StringNotInFilter` was added + +* `models.PartnerClientAuthentication` 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.PartnerEndpointType` 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.NetworkSecurityPerimeterConfigurationIssues` was added + +* `models.PartnerTopicActivationState` was added + +* `models.PartnerDestinationProvisioningState` was added + +* `models.TopicSpacesListResult` was added + +* `models.CustomJwtAuthenticationManagedIdentityType` 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.PartnerDestinations` was added + +* `models.PartnerDestination` 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.EncodedIssuerCertificateInfo` was added + +* `models.ClientGroupProvisioningState` was added + +* `models.CustomJwtAuthenticationSettings` was added + +* `models.TlsVersion` was added + +* `models.NetworkSecurityPerimeterConfigurationProfile` was added + +* `models.NumberLessThanOrEqualsFilter` was added + +* `models.PartnerTopicInfo` was added + +* `models.NetworkSecurityPerimeterAssociationAccessMode` was added + +* `models.PartnerNamespace$DefinitionStages` was added + +* `models.Channel$Update` was added + +* `models.CaCertificatesListResult` was added + +* `models.StaticStringRoutingEnrichment` was added + +* `models.ResourceMoveChangeHistory` was added + +* `models.PartnerTopicProvisioningState` was added + +* `models.CustomDomainConfiguration` was added + +* `models.StringNotContainsFilter` was added + +* `models.PartnerTopic` was added + +* `models.EventDefinitionKind` was added + +* `models.WebhookPartnerDestinationInfo` was added + +* `models.PartnerNamespace$Definition` was added + +* `models.EventInputSchema` was added + +* `models.PartnerNamespaceRegenerateKeyRequest` was added + +* `models.NamespaceTopicProvisioningState` was added + +* `models.PartnerAuthorization` was added + +* `models.PartnerDestination$Update` 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.NetworkSecurityPerimeterConfigurationList` 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.CustomJwtAuthenticationManagedIdentity` 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.PartnerEventSubscriptionDestination` was added + +* `models.IsNotNullFilter` was added + +* `models.Namespace$Definition` was added + +* `models.ClientAuthenticationSettings` 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.ResourceAssociation` was added + +* `models.PartnerDestinationUpdateParameters` 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.NetworkSecurityPerimeterConfigProvisioningState` 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.PartnerClientAuthenticationType` 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.PartnerDestinationActivationState` was added + +* `models.PartnerTopic$Update` was added + +* `models.EventTypeInfo` was added + +* `models.Subscription` was added + +* `models.PartnerNamespacesListResult` was added + +* `models.AlternativeAuthenticationNameSource` was added + +* `models.TopicSpace$UpdateStages` was added + +* `models.ClientGroupsListResult` was added + +* `models.Client$UpdateStages` was added + +* `models.NamespaceTopic$DefinitionStages` was added + +* `models.WebhookUpdatePartnerDestinationInfo` 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.NetworkSecurityPerimeterConfigurationIssueType` was added + +* `models.Channel$Definition` was added + +* `models.NetworkSecurityPerimeterResourceType` was added + +* `models.FederatedIdentityCredentialInfo` was added + +* `models.TopicSpacesConfigurationState` was added + +* `models.PartnerTopic$UpdateStages` was added + +* `models.NetworkSecurityPerimeterSubscription` was added + +* `models.ClientGroup$Definition` was added + +* `models.SubscriptionUpdateParameters` was added + +* `models.NamespaceTopic$UpdateStages` was added + +* `models.NetworkSecurityPerimeterProfileAccessRule` was added + +* `models.NamespaceTopicUpdateParameters` was added + +* `models.NetworkSecurityPerimeterConfigurations` 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.NetworkSecurityPerimeterInfo` was added + +* `models.StaticRoutingEnrichment` was added + +* `models.CustomDomainIdentityType` was added + +* `models.AzureADPartnerClientAuthentication` 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.IssuerCertificateInfo` was added + +* `models.NamespaceRegenerateKeyRequest` was added + +* `models.PartnerNamespaceProvisioningState` was added + +* `models.PartnerTopicsListResult` was added + +* `models.PartnerDestination$UpdateStages` was added + +* `models.NumberNotInRangeFilter` was added + +* `models.ExtendedLocation` was added + +* `models.PartnerDestination$DefinitionStages` was added + +* `models.PartnerRegistrations` was added + +* `models.VerifiedPartner` was added + +* `models.PartnerNamespace$UpdateStages` was added + +* `models.NetworkSecurityPerimeterProfileAccessRuleDirection` was added + +* `models.Partner` was added + +* `models.NetworkSecurityPerimeterConfiguration` was added + +* `models.PartnerDestinationsListResult` 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 + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.SystemTopic` was modified + +* `resourceGroupName()` was added + +#### `models.StringNotBeginsWithAdvancedFilter` was modified + +* `operatorType()` was added +* `fromJson(com.azure.json.JsonReader)` 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 + +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added +* `endpointType()` was added +* `minimumTlsVersionAllowed()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.StringEndsWithAdvancedFilter` was modified + +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.NumberInRangeAdvancedFilter` was modified + +* `operatorType()` was added +* `fromJson(com.azure.json.JsonReader)` 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 + +* `endpointType()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.PrivateEndpointConnectionListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.UserIdentityProperties` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.TopicUpdateParameters` was modified + +* `withDataResidencyBoundary(models.DataResidencyBoundary)` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `eventTypeInfo()` was added +* `sku()` was added +* `withEventTypeInfo(models.EventTypeInfo)` was added +* `dataResidencyBoundary()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `minimumTlsVersionAllowed()` was added +* `withSku(models.ResourceSku)` was added +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added + +#### `models.IsNullOrUndefinedAdvancedFilter` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `operatorType()` was added +* `fromJson(com.azure.json.JsonReader)` 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 +* `withEventTypeInfo(models.EventTypeInfo)` was added +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added +* `withSku(models.ResourceSku)` was added + +#### `models.DomainsListResult` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.Topic$Definition` was modified + +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added +* `withExtendedLocation(models.ExtendedLocation)` was added +* `withDataResidencyBoundary(models.DataResidencyBoundary)` was added +* `withEventTypeInfo(models.EventTypeInfo)` was added +* `withKind(models.ResourceKind)` was added +* `withSku(models.ResourceSku)` was added + +#### `models.StringBeginsWithAdvancedFilter` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `operatorType()` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.DeliveryAttributeMapping` was modified + +* `type()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.DomainUpdateParameters` was modified + +* `minimumTlsVersionAllowed()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `withDataResidencyBoundary(models.DataResidencyBoundary)` was added +* `withSku(models.ResourceSku)` was added +* `eventTypeInfo()` was added +* `sku()` was added +* `dataResidencyBoundary()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `withEventTypeInfo(models.EventTypeInfo)` was added +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added + +#### `models.StringNotEndsWithAdvancedFilter` was modified + +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.NumberGreaterThanAdvancedFilter` was modified + +* `operatorType()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` 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 + +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` 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 + +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added +* `withEventTypeInfo(models.EventTypeInfo)` was added +* `withDataResidencyBoundary(models.DataResidencyBoundary)` was added +* `withSku(models.ResourceSku)` was added + +#### `models.NumberLessThanAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `operatorType()` 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 +* `toJson(com.azure.json.JsonWriter)` was added +* `endpointType()` was added + +#### `models.Domain` was modified + +* `resourceGroupName()` was added +* `eventTypeInfo()` was added +* `dataResidencyBoundary()` was added +* `sku()` was added +* `minimumTlsVersionAllowed()` was added + +#### `models.DeadLetterDestination` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `endpointType()` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.DynamicDeliveryAttributeMapping` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `type()` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.StorageBlobDeadLetterDestination` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `endpointType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.JsonField` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.EventSubscriptions` was modified + +* `createOrUpdate(java.lang.String,java.lang.String,fluent.models.EventSubscriptionInner,com.azure.core.util.Context)` was added +* `createOrUpdate(java.lang.String,java.lang.String,fluent.models.EventSubscriptionInner)` was added +* `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 + +#### `EventGridManager` was modified + +* `authenticate(com.azure.core.http.HttpPipeline,com.azure.core.management.profile.AzureProfile)` was added +* `channels()` was added +* `namespaceTopicEventSubscriptions()` was added +* `permissionBindings()` was added +* `clients()` was added +* `partnerDestinations()` was added +* `domainEventSubscriptions()` was added +* `clientGroups()` was added +* `namespaceTopics()` was added +* `partnerRegistrations()` was added +* `partnerTopics()` was added +* `domainTopicEventSubscriptions()` was added +* `namespaces()` was added +* `caCertificates()` was added +* `topicSpaces()` was added +* `partnerTopicEventSubscriptions()` was added +* `verifiedPartners()` was added +* `networkSecurityPerimeterConfigurations()` was added +* `topicEventSubscriptions()` was added +* `partnerConfigurations()` was added +* `partnerNamespaces()` was added + +#### `models.RetryPolicy` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.JsonInputSchemaMapping` was modified + +* `inputSchemaMappingType()` was added +* `fromJson(com.azure.json.JsonReader)` 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 + +* `toJson(com.azure.json.JsonWriter)` was added +* `federatedIdentityCredentialInfo()` was added +* `withFederatedIdentityCredentialInfo(models.FederatedIdentityCredentialInfo)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.Topic` was modified + +* `kind()` was added +* `eventTypeInfo()` was added +* `sku()` was added +* `minimumTlsVersionAllowed()` was added +* `dataResidencyBoundary()` was added +* `extendedLocation()` was added +* `resourceGroupName()` 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 + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.StorageQueueEventSubscriptionDestination` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `endpointType()` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.OperationInfo` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.StringInAdvancedFilter` was modified + +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.StringContainsAdvancedFilter` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `operatorType()` was added + +#### `models.DomainRegenerateKeyRequest` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.NumberNotInRangeAdvancedFilter` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added + +#### `models.IdentityInfo` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` 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 + +* `fromJson(com.azure.json.JsonReader)` was added +* `endpointType()` 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 +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` 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 + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` 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 + +* `endpointType()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.InputSchemaMapping` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `inputSchemaMappingType()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.TopicTypeInfo` was modified + +* `areRegionalAndGlobalSourcesSupported()` was added +* `additionalEnforcedPermissions()` was added + +#### `models.StringNotContainsAdvancedFilter` was modified + +* `operatorType()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.EventHubEventSubscriptionDestination` was modified + +* `endpointType()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.TopicTypesListResult` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.NumberLessThanOrEqualsAdvancedFilter` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `operatorType()` was added + +#### `models.Domain$Definition` was modified + +* `withSku(models.ResourceSku)` was added +* `withEventTypeInfo(models.EventTypeInfo)` was added +* `withMinimumTlsVersionAllowed(models.TlsVersion)` was added +* `withDataResidencyBoundary(models.DataResidencyBoundary)` was added + +#### `models.JsonFieldWithDefault` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `EventGridManager$Configurable` was modified + +* `withRetryOptions(com.azure.core.http.policy.RetryOptions)` was added + +#### `models.NumberInAdvancedFilter` was modified + +* `operatorType()` was added +* `fromJson(com.azure.json.JsonReader)` 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.6 (2024-04-28) diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md index b8b8660ae2319..ffa717b45a1fb 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-2024-12-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-eventgrid - 1.2.0-beta.6 + 1.2.0-beta.7 ``` [//]: # ({x-version-update-end}) @@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. +Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package. -- `AZURE_CLIENT_ID` for Azure client ID. -- `AZURE_TENANT_ID` for Azure tenant ID. -- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. +Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. - -With above configuration, `azure` client can be authenticated using the following code: +Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -97,6 +93,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md index a415749bccf66..5a5e103446794 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md @@ -281,7 +281,9 @@ */ public final class CaCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * CaCertificates_CreateOrUpdate.json */ /** * Sample code: CaCertificates_CreateOrUpdate. @@ -307,7 +309,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * CaCertificates_Delete.json */ /** * Sample code: CaCertificates_Delete. @@ -330,7 +334,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * CaCertificates_Get.json */ /** * Sample code: CaCertificates_Get. @@ -353,7 +359,9 @@ public final class CaCertificatesGetSamples { */ public final class CaCertificatesListByNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_ListByNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * CaCertificates_ListByNamespace.json */ /** * Sample code: CaCertificates_ListByNamespace. @@ -379,7 +387,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Channels_CreateOrUpdate.json */ /** * Sample code: Channels_CreateOrUpdate. @@ -410,7 +420,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Channels_Delete. + * json */ /** * Sample code: Channels_Delete. @@ -433,7 +445,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Channels_Get. + * json */ /** * Sample code: Channels_Get. @@ -456,7 +470,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Channels_GetFullUrl.json */ /** * Sample code: Channels_GetFullUrl. @@ -479,7 +495,9 @@ public final class ChannelsGetFullUrlSamples { */ public final class ChannelsListByPartnerNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_ListByPartnerNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Channels_ListByPartnerNamespace.json */ /** * Sample code: Channels_ListByPartnerNamespace. @@ -505,7 +523,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Channels_Update. + * json */ /** * Sample code: Channels_Update. @@ -530,7 +550,9 @@ public final class ChannelsUpdateSamples { */ public final class ClientGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * ClientGroups_CreateOrUpdate.json */ /** * Sample code: ClientGroups_CreateOrUpdate. @@ -556,7 +578,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * ClientGroups_Delete.json */ /** * Sample code: ClientGroups_Delete. @@ -578,7 +602,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ClientGroups_Get + * .json */ /** * Sample code: ClientGroups_Get. @@ -601,7 +627,9 @@ public final class ClientGroupsGetSamples { */ public final class ClientGroupsListByNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_ListByNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * ClientGroups_ListByNamespace.json */ /** * Sample code: ClientGroups_ListByNamespace. @@ -632,7 +660,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Clients_CreateOrUpdate.json */ /** * Sample code: Clients_CreateOrUpdate. @@ -677,7 +707,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Clients_Delete. + * json */ /** * Sample code: Clients_Delete. @@ -699,7 +731,8 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Clients_Get.json */ /** * Sample code: Clients_Get. @@ -722,7 +755,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Clients_ListByNamespace.json */ /** * Sample code: Clients_ListByNamespace. @@ -747,7 +782,9 @@ 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/DomainEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: DomainEventSubscriptions_CreateOrUpdate. @@ -777,7 +814,9 @@ public final class DomainEventSubscriptionsCreateOrUpdateSamples { */ public final class DomainEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_Delete.json */ /** * Sample code: DomainEventSubscriptions_Delete. @@ -799,7 +838,9 @@ public final class DomainEventSubscriptionsDeleteSamples { */ public final class DomainEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_Get.json */ /** * Sample code: DomainEventSubscriptions_Get. @@ -821,7 +862,9 @@ public final class DomainEventSubscriptionsGetSamples { */ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: DomainEventSubscriptions_GetDeliveryAttributes. @@ -845,7 +888,9 @@ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { */ public final class DomainEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_GetFullUrl.json */ /** * Sample code: DomainEventSubscriptions_GetFullUrl. @@ -869,7 +914,9 @@ public final class DomainEventSubscriptionsGetFullUrlSamples { */ public final class DomainEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_List.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_List.json */ /** * Sample code: DomainEventSubscriptions_List. @@ -896,7 +943,9 @@ import java.util.Arrays; */ public final class DomainEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_Update.json */ /** * Sample code: DomainEventSubscriptions_Update. @@ -930,7 +979,9 @@ 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/DomainTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: DomainTopicEventSubscriptions_CreateOrUpdate. @@ -960,7 +1011,9 @@ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class DomainTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_Delete.json */ /** * Sample code: DomainTopicEventSubscriptions_Delete. @@ -984,7 +1037,9 @@ public final class DomainTopicEventSubscriptionsDeleteSamples { */ public final class DomainTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_Get.json */ /** * Sample code: DomainTopicEventSubscriptions_Get. @@ -1007,7 +1062,9 @@ public final class DomainTopicEventSubscriptionsGetSamples { */ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: DomainTopicEventSubscriptions_GetDeliveryAttributes. @@ -1031,7 +1088,9 @@ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: DomainTopicEventSubscriptions_GetFullUrl. @@ -1055,7 +1114,9 @@ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { */ public final class DomainTopicEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_List.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_List.json */ /** * Sample code: DomainTopicEventSubscriptions_List. @@ -1082,7 +1143,9 @@ import java.util.Arrays; */ public final class DomainTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_Update.json */ /** * Sample code: DomainTopicEventSubscriptions_Update. @@ -1113,7 +1176,9 @@ public final class DomainTopicEventSubscriptionsUpdateSamples { */ public final class DomainTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopics_CreateOrUpdate.json */ /** * Sample code: DomainTopics_CreateOrUpdate. @@ -1135,7 +1200,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopics_Delete.json */ /** * Sample code: DomainTopics_Delete. @@ -1157,7 +1224,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/DomainTopics_Get + * .json */ /** * Sample code: DomainTopics_Get. @@ -1179,7 +1248,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopics_ListByDomain.json */ /** * Sample code: DomainTopics_ListByDomain. @@ -1208,7 +1279,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Domains_CreateOrUpdate.json */ /** * Sample code: Domains_CreateOrUpdate. @@ -1250,7 +1323,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Domains_Delete. + * json */ /** * Sample code: Domains_Delete. @@ -1271,7 +1346,8 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Domains_Get.json */ /** * Sample code: Domains_Get. @@ -1293,7 +1369,9 @@ public final class DomainsGetByResourceGroupSamples { */ public final class DomainsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Domains_ListBySubscription.json */ /** * Sample code: Domains_ListBySubscription. @@ -1314,7 +1392,9 @@ public final class DomainsListSamples { */ public final class DomainsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Domains_ListByResourceGroup.json */ /** * Sample code: Domains_ListByResourceGroup. @@ -1335,7 +1415,9 @@ public final class DomainsListByResourceGroupSamples { */ public final class DomainsListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListSharedAccessKeys.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Domains_ListSharedAccessKeys.json */ /** * Sample code: Domains_ListSharedAccessKeys. @@ -1359,7 +1441,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Domains_RegenerateKey.json */ /** * Sample code: Domains_RegenerateKey. @@ -1390,7 +1474,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Domains_Update. + * json */ /** * Sample code: Domains_Update. @@ -1443,7 +1529,9 @@ 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/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination. @@ -1465,7 +1553,9 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForSubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForSubscription.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForSubscription. @@ -1484,7 +1574,9 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination. @@ -1510,7 +1602,9 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForResource.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResource. @@ -1533,7 +1627,9 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic. @@ -1555,7 +1651,9 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResourceGroup. @@ -1577,7 +1675,9 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination. @@ -1602,7 +1702,9 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination. @@ -1630,7 +1732,9 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination. @@ -1656,7 +1760,9 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination. @@ -1682,7 +1788,9 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination. @@ -1717,7 +1825,9 @@ public final class EventSubscriptionsCreateOrUpdateSamples { */ public final class EventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForCustomTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_DeleteForCustomTopic.json */ /** * Sample code: EventSubscriptions_DeleteForCustomTopic. @@ -1733,7 +1843,9 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_DeleteForResourceGroup.json */ /** * Sample code: EventSubscriptions_DeleteForResourceGroup. @@ -1748,7 +1860,9 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForSubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_DeleteForSubscription.json */ /** * Sample code: EventSubscriptions_DeleteForSubscription. @@ -1763,7 +1877,9 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_DeleteForResource.json */ /** * Sample code: EventSubscriptions_DeleteForResource. @@ -1788,7 +1904,9 @@ public final class EventSubscriptionsDeleteSamples { */ public final class EventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_HybridConnectionDestination. @@ -1804,7 +1922,9 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination. @@ -1820,7 +1940,9 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetForResourceGroup. @@ -1835,7 +1957,9 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_EventHubDestination. @@ -1851,7 +1975,9 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForSubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForSubscription.json */ /** * Sample code: EventSubscriptions_GetForSubscription. @@ -1866,7 +1992,9 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_WebhookDestination. @@ -1882,7 +2010,9 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_AzureFunctionDestination. @@ -1898,7 +2028,9 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic. @@ -1914,7 +2046,9 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_StorageQueueDestination. @@ -1930,7 +2064,9 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForResource.json */ /** * Sample code: EventSubscriptions_GetForResource. @@ -1945,7 +2081,9 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination. @@ -1970,7 +2108,9 @@ public final class EventSubscriptionsGetSamples { */ public final class EventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: EventSubscriptions_GetDeliveryAttributes. @@ -1995,7 +2135,9 @@ public final class EventSubscriptionsGetDeliveryAttributesSamples { */ public final class EventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetFullUrlForResource.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResource. @@ -2011,7 +2153,9 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetFullUrlForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResourceGroup. @@ -2026,7 +2170,9 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForSubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetFullUrlForSubscription.json */ /** * Sample code: EventSubscriptions_GetFullUrlForSubscription. @@ -2041,7 +2187,9 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForCustomTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetFullUrlForCustomTopic.json */ /** * Sample code: EventSubscriptions_GetFullUrlForCustomTopic. @@ -2066,7 +2214,9 @@ public final class EventSubscriptionsGetFullUrlSamples { */ public final class EventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListGlobalBySubscription.json */ /** * Sample code: EventSubscriptions_ListGlobalBySubscription. @@ -2088,7 +2238,9 @@ public final class EventSubscriptionsListSamples { */ public final class EventSubscriptionsListByDomainTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListByDomainTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListByDomainTopic.json */ /** * Sample code: EventSubscriptions_ListByDomainTopic. @@ -2111,7 +2263,9 @@ public final class EventSubscriptionsListByDomainTopicSamples { */ public final class EventSubscriptionsListByResourceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListByResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListByResource.json */ /** * Sample code: EventSubscriptions_ListByResource. @@ -2134,7 +2288,9 @@ public final class EventSubscriptionsListByResourceSamples { */ public final class EventSubscriptionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListGlobalByResourceGroup.json */ /** * Sample code: EventSubscriptions_ListGlobalByResourceGroup. @@ -2156,7 +2312,9 @@ public final class EventSubscriptionsListByResourceGroupSamples { */ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroupForTopicType.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListGlobalByResourceGroupForTopicType.json */ /** * Sample code: EventSubscriptions_ListGlobalByResourceGroupForTopicType. @@ -2180,7 +2338,9 @@ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSample */ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscriptionForTopicType.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListGlobalBySubscriptionForTopicType.json */ /** * Sample code: EventSubscriptions_ListGlobalBySubscriptionForTopicType. @@ -2204,7 +2364,9 @@ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples */ public final class EventSubscriptionsListRegionalByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListRegionalByResourceGroup.json */ /** * Sample code: EventSubscriptions_ListRegionalByResourceGroup. @@ -2227,7 +2389,9 @@ public final class EventSubscriptionsListRegionalByResourceGroupSamples { */ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroupForTopicType.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListRegionalByResourceGroupForTopicType.json */ /** * Sample code: EventSubscriptions_ListRegionalByResourceGroupForTopicType. @@ -2251,7 +2415,9 @@ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamp */ public final class EventSubscriptionsListRegionalBySubscriptionSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListRegionalBySubscription.json */ /** * Sample code: EventSubscriptions_ListRegionalBySubscription. @@ -2274,7 +2440,9 @@ public final class EventSubscriptionsListRegionalBySubscriptionSamples { */ public final class EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscriptionForTopicType.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListRegionalBySubscriptionForTopicType.json */ /** * Sample code: EventSubscriptions_ListRegionalBySubscriptionForTopicType. @@ -2310,7 +2478,9 @@ import java.util.Arrays; */ public final class EventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_EventHubDestination. @@ -2334,7 +2504,9 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination. @@ -2360,7 +2532,9 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_WebhookDestination. @@ -2384,7 +2558,9 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination. @@ -2412,7 +2588,9 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination. @@ -2436,7 +2614,9 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination. @@ -2460,7 +2640,9 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination. @@ -2486,7 +2668,9 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic. @@ -2510,7 +2694,9 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForResource.json */ /** * Sample code: EventSubscriptions_UpdateForResource. @@ -2534,7 +2720,9 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_UpdateForResourceGroup. @@ -2557,7 +2745,9 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForSubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForSubscription.json */ /** * Sample code: EventSubscriptions_UpdateForSubscription. @@ -2588,7 +2778,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * ExtensionTopics_Get.json */ /** * Sample code: ExtensionTopics_Get. @@ -2618,7 +2810,9 @@ import java.time.Duration; */ public final class NamespaceTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: NamespaceTopicEventSubscriptions_CreateOrUpdate. @@ -2648,7 +2842,9 @@ public final class NamespaceTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class NamespaceTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_Delete.json */ /** * Sample code: NamespaceTopicEventSubscriptions_Delete. @@ -2672,7 +2868,9 @@ public final class NamespaceTopicEventSubscriptionsDeleteSamples { */ public final class NamespaceTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_Get.json */ /** * Sample code: NamespaceTopicEventSubscriptions_Get. @@ -2696,7 +2894,9 @@ public final class NamespaceTopicEventSubscriptionsGetSamples { */ public final class NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: NamespaceTopicEventSubscriptions_GetDeliveryAttributes. @@ -2720,7 +2920,9 @@ public final class NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples */ public final class NamespaceTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: NamespaceTopicEventSubscriptions_GetFullUrl. @@ -2744,7 +2946,9 @@ public final class NamespaceTopicEventSubscriptionsGetFullUrlSamples { */ public final class NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json */ /** * Sample code: NamespaceTopicEventSubscriptions_ListByNamespaceTopic. @@ -2775,7 +2979,9 @@ import java.time.Duration; */ public final class NamespaceTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_Update.json */ /** * Sample code: NamespaceTopicEventSubscriptions_Update. @@ -2810,7 +3016,9 @@ 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/NamespaceTopics_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopics_CreateOrUpdate.json */ /** * Sample code: NamespaceTopics_CreateOrUpdate. @@ -2837,7 +3045,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopics_Delete.json */ /** * Sample code: NamespaceTopics_Delete. @@ -2859,7 +3069,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopics_Get.json */ /** * Sample code: NamespaceTopics_Get. @@ -2882,7 +3094,9 @@ public final class NamespaceTopicsGetSamples { */ public final class NamespaceTopicsListByNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_ListByNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopics_ListByNamespace.json */ /** * Sample code: NamespaceTopics_ListByNamespace. @@ -2904,7 +3118,9 @@ public final class NamespaceTopicsListByNamespaceSamples { */ public final class NamespaceTopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_ListSharedAccessKeys.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopics_ListSharedAccessKeys.json */ /** * Sample code: NamespaceTopics_ListSharedAccessKeys. @@ -2930,7 +3146,9 @@ 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/NamespaceTopics_RegenerateKey.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopics_RegenerateKey.json */ /** * Sample code: NamespaceTopics_RegenerateKey. @@ -2955,7 +3173,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopics_Update.json */ /** * Sample code: NamespaceTopics_Update. @@ -2985,7 +3205,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_CreateOrUpdate.json */ /** * Sample code: Namespaces_CreateOrUpdate. @@ -3027,7 +3249,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_Delete.json */ /** * Sample code: Namespaces_Delete. @@ -3048,7 +3272,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Namespaces_Get. + * json */ /** * Sample code: Namespaces_Get. @@ -3070,7 +3296,9 @@ public final class NamespacesGetByResourceGroupSamples { */ public final class NamespacesListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_ListBySubscription.json */ /** * Sample code: Namespaces_ListBySubscription. @@ -3091,7 +3319,9 @@ public final class NamespacesListSamples { */ public final class NamespacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_ListByResourceGroup.json */ /** * Sample code: Namespaces_ListByResourceGroup. @@ -3112,7 +3342,9 @@ public final class NamespacesListByResourceGroupSamples { */ public final class NamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListSharedAccessKeys.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_ListSharedAccessKeys.json */ /** * Sample code: Namespaces_ListSharedAccessKeys. @@ -3136,7 +3368,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_RegenerateKey.json */ /** * Sample code: Namespaces_RegenerateKey. @@ -3164,7 +3398,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_Update.json */ /** * Sample code: Namespaces_Update. @@ -3200,7 +3436,9 @@ public final class NamespacesUpdateSamples { */ public final class NamespacesValidateCustomDomainOwnershipSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ValidateCustomDomainOwnership.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_ValidateCustomDomainOwnership.json */ /** * Sample code: Namespaces_ValidateCustomDomainOwnership. @@ -3225,7 +3463,9 @@ import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResour */ public final class NetworkSecurityPerimeterConfigurationsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NetworkSecurityPerimeterConfigurations_Get.json */ /** * Sample code: NetworkSecurityPerimeterConfigurations_Get. @@ -3251,7 +3491,9 @@ import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResour */ public final class NetworkSecurityPerimeterConfigurationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_List.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NetworkSecurityPerimeterConfigurations_List.json */ /** * Sample code: NetworkSecurityPerimeterConfigurations_List. @@ -3277,7 +3519,9 @@ import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResour */ public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_Reconcile.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NetworkSecurityPerimeterConfigurations_Reconcile.json */ /** * Sample code: NetworkSecurityPerimeterConfigurations_Reconcile. @@ -3301,7 +3545,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Operations_List. + * json */ /** * Sample code: Operations_List. @@ -3326,7 +3572,9 @@ import java.util.UUID; */ public final class PartnerConfigurationsAuthorizePartnerSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_AuthorizePartner.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_AuthorizePartner.json */ /** * Sample code: PartnerConfigurations_AuthorizePartner. @@ -3361,7 +3609,9 @@ import java.util.UUID; */ public final class PartnerConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_CreateOrUpdate.json */ /** * Sample code: PartnerConfigurations_CreateOrUpdate. @@ -3399,7 +3649,9 @@ public final class PartnerConfigurationsCreateOrUpdateSamples { */ public final class PartnerConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_Delete.json */ /** * Sample code: PartnerConfigurations_Delete. @@ -3420,7 +3672,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_Get.json */ /** * Sample code: PartnerConfigurations_Get. @@ -3441,7 +3695,9 @@ public final class PartnerConfigurationsGetByResourceGroupSamples { */ public final class PartnerConfigurationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_ListBySubscription.json */ /** * Sample code: PartnerConfigurations_ListBySubscription. @@ -3463,7 +3719,9 @@ public final class PartnerConfigurationsListSamples { */ public final class PartnerConfigurationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_ListByResourceGroup.json */ /** * Sample code: PartnerConfigurations_ListByResourceGroup. @@ -3489,7 +3747,9 @@ import java.util.UUID; */ public final class PartnerConfigurationsUnauthorizePartnerSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_UnauthorizePartner.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_UnauthorizePartner.json */ /** * Sample code: PartnerConfigurations_UnauthorizePartner. @@ -3521,7 +3781,9 @@ import java.util.Map; */ public final class PartnerConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_Update.json */ /** * Sample code: PartnerConfigurations_Update. @@ -3558,7 +3820,9 @@ public final class PartnerConfigurationsUpdateSamples { */ public final class PartnerDestinationsActivateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Activate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_Activate.json */ /** * Sample code: PartnerDestinations_Activate. @@ -3583,7 +3847,9 @@ import java.util.UUID; */ public final class PartnerDestinationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_CreateOrUpdate.json */ /** * Sample code: PartnerDestinations_CreateOrUpdate. @@ -3613,7 +3879,9 @@ public final class PartnerDestinationsCreateOrUpdateSamples { */ public final class PartnerDestinationsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_Delete.json */ /** * Sample code: PartnerDestinations_Delete. @@ -3635,7 +3903,9 @@ public final class PartnerDestinationsDeleteSamples { */ public final class PartnerDestinationsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_Get.json */ /** * Sample code: PartnerDestinations_Get. @@ -3658,7 +3928,9 @@ public final class PartnerDestinationsGetByResourceGroupSamples { */ public final class PartnerDestinationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_ListBySubscription.json */ /** * Sample code: PartnerDestinations_ListBySubscription. @@ -3680,7 +3952,9 @@ public final class PartnerDestinationsListSamples { */ public final class PartnerDestinationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_ListByResourceGroup.json */ /** * Sample code: PartnerDestinations_ListByResourceGroup. @@ -3706,7 +3980,9 @@ import java.util.Map; */ public final class PartnerDestinationsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_Update.json */ /** * Sample code: PartnerDestinations_Update. @@ -3746,7 +4022,9 @@ import java.util.Map; */ public final class PartnerNamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_CreateOrUpdate.json */ /** * Sample code: PartnerNamespaces_CreateOrUpdate. @@ -3786,7 +4064,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_Delete.json */ /** * Sample code: PartnerNamespaces_Delete. @@ -3808,7 +4088,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_Get.json */ /** * Sample code: PartnerNamespaces_Get. @@ -3831,7 +4113,9 @@ public final class PartnerNamespacesGetByResourceGroupSamples { */ public final class PartnerNamespacesListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_ListBySubscription.json */ /** * Sample code: PartnerNamespaces_ListBySubscription. @@ -3853,7 +4137,9 @@ public final class PartnerNamespacesListSamples { */ public final class PartnerNamespacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_ListByResourceGroup.json */ /** * Sample code: PartnerNamespaces_ListByResourceGroup. @@ -3875,7 +4161,9 @@ public final class PartnerNamespacesListByResourceGroupSamples { */ public final class PartnerNamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListSharedAccessKeys.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_ListSharedAccessKeys.json */ /** * Sample code: PartnerNamespaces_ListSharedAccessKeys. @@ -3901,7 +4189,9 @@ 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/PartnerNamespaces_RegenerateKey.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_RegenerateKey.json */ /** * Sample code: PartnerNamespaces_RegenerateKey. @@ -3929,7 +4219,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_Update.json */ /** * Sample code: PartnerNamespaces_Update. @@ -3969,7 +4261,9 @@ import java.util.Map; */ public final class PartnerRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerRegistrations_CreateOrUpdate.json */ /** * Sample code: PartnerRegistrations_CreateOrUpdate. @@ -4009,7 +4303,9 @@ public final class PartnerRegistrationsCreateOrUpdateSamples { */ public final class PartnerRegistrationsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerRegistrations_Delete.json */ /** * Sample code: PartnerRegistrations_Delete. @@ -4031,7 +4327,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerRegistrations_Get.json */ /** * Sample code: PartnerRegistrations_Get. @@ -4054,7 +4352,9 @@ public final class PartnerRegistrationsGetByResourceGroupSamples { */ public final class PartnerRegistrationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerRegistrations_ListBySubscription.json */ /** * Sample code: PartnerRegistrations_ListBySubscription. @@ -4076,7 +4376,9 @@ public final class PartnerRegistrationsListSamples { */ public final class PartnerRegistrationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerRegistrations_ListByResourceGroup.json */ /** * Sample code: PartnerRegistrations_ListByResourceGroup. @@ -4102,7 +4404,9 @@ import java.util.Map; */ public final class PartnerRegistrationsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerRegistrations_Update.json */ /** * Sample code: PartnerRegistrations_Update. @@ -4143,7 +4447,9 @@ 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/PartnerTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: PartnerTopicEventSubscriptions_CreateOrUpdate. @@ -4173,7 +4479,9 @@ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class PartnerTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_Delete.json */ /** * Sample code: PartnerTopicEventSubscriptions_Delete. @@ -4196,7 +4504,9 @@ public final class PartnerTopicEventSubscriptionsDeleteSamples { */ public final class PartnerTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_Get.json */ /** * Sample code: PartnerTopicEventSubscriptions_Get. @@ -4219,7 +4529,9 @@ public final class PartnerTopicEventSubscriptionsGetSamples { */ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: PartnerTopicEventSubscriptions_GetDeliveryAttributes. @@ -4243,7 +4555,9 @@ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: PartnerTopicEventSubscriptions_GetFullUrl. @@ -4267,7 +4581,9 @@ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { */ public final class PartnerTopicEventSubscriptionsListByPartnerTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_ListByPartnerTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_ListByPartnerTopic.json */ /** * Sample code: PartnerTopicEventSubscriptions_ListByPartnerTopic. @@ -4295,7 +4611,9 @@ import java.util.Arrays; */ public final class PartnerTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_Update.json */ /** * Sample code: PartnerTopicEventSubscriptions_Update. @@ -4326,7 +4644,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopics_Activate.json */ /** * Sample code: PartnerTopics_Activate. @@ -4351,7 +4671,9 @@ import java.util.UUID; */ public final class PartnerTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopics_CreateOrUpdate.json */ /** * Sample code: PartnerTopics_CreateOrUpdate. @@ -4381,7 +4703,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopics_Deactivate.json */ /** * Sample code: PartnerTopics_Deactivate. @@ -4403,7 +4727,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopics_Delete.json */ /** * Sample code: PartnerTopics_Delete. @@ -4424,7 +4750,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopics_Get.json */ /** * Sample code: PartnerTopics_Get. @@ -4446,7 +4774,9 @@ public final class PartnerTopicsGetByResourceGroupSamples { */ public final class PartnerTopicsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopics_ListBySubscription.json */ /** * Sample code: PartnerTopics_ListBySubscription. @@ -4467,7 +4797,9 @@ public final class PartnerTopicsListSamples { */ public final class PartnerTopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopics_ListByResourceGroup.json */ /** * Sample code: PartnerTopics_ListByResourceGroup. @@ -4492,7 +4824,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopics_Update.json */ /** * Sample code: PartnerTopics_Update. @@ -4530,7 +4864,9 @@ 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/PermissionBindings_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PermissionBindings_CreateOrUpdate.json */ /** * Sample code: PermissionBindings_CreateOrUpdate. @@ -4557,7 +4893,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PermissionBindings_Delete.json */ /** * Sample code: PermissionBindings_Delete. @@ -4580,7 +4918,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PermissionBindings_Get.json */ /** * Sample code: PermissionBindings_Get. @@ -4603,7 +4943,9 @@ public final class PermissionBindingsGetSamples { */ public final class PermissionBindingsListByNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_ListByNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PermissionBindings_ListByNamespace.json */ /** * Sample code: PermissionBindings_ListByNamespace. @@ -4627,7 +4969,9 @@ 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/PrivateEndpointConnections_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PrivateEndpointConnections_Delete.json */ /** * Sample code: PrivateEndpointConnections_Delete. @@ -4652,7 +4996,9 @@ 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/PrivateEndpointConnections_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PrivateEndpointConnections_Get.json */ /** * Sample code: PrivateEndpointConnections_Get. @@ -4677,7 +5023,9 @@ 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/PrivateEndpointConnections_ListByResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PrivateEndpointConnections_ListByResource.json */ /** * Sample code: PrivateEndpointConnections_ListByResource. @@ -4706,7 +5054,9 @@ 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/PrivateEndpointConnections_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PrivateEndpointConnections_Update.json */ /** * Sample code: PrivateEndpointConnections_Update. @@ -4734,7 +5084,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PrivateLinkResources_Get.json */ /** * Sample code: PrivateLinkResources_Get. @@ -4756,7 +5108,9 @@ public final class PrivateLinkResourcesGetSamples { */ public final class PrivateLinkResourcesListByResourceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PrivateLinkResources_ListByResource.json */ /** * Sample code: PrivateLinkResources_ListByResource. @@ -4783,7 +5137,9 @@ 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/SystemTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: SystemTopicEventSubscriptions_CreateOrUpdate. @@ -4813,7 +5169,9 @@ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class SystemTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_Delete.json */ /** * Sample code: SystemTopicEventSubscriptions_Delete. @@ -4836,7 +5194,9 @@ public final class SystemTopicEventSubscriptionsDeleteSamples { */ public final class SystemTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_Get.json */ /** * Sample code: SystemTopicEventSubscriptions_Get. @@ -4859,7 +5219,9 @@ public final class SystemTopicEventSubscriptionsGetSamples { */ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: SystemTopicEventSubscriptions_GetDeliveryAttributes. @@ -4883,7 +5245,9 @@ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: SystemTopicEventSubscriptions_GetFullUrl. @@ -4907,7 +5271,9 @@ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { */ public final class SystemTopicEventSubscriptionsListBySystemTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_ListBySystemTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_ListBySystemTopic.json */ /** * Sample code: SystemTopicEventSubscriptions_ListBySystemTopic. @@ -4935,7 +5301,9 @@ import java.util.Arrays; */ public final class SystemTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_Update.json */ /** * Sample code: SystemTopicEventSubscriptions_Update. @@ -4969,7 +5337,9 @@ import java.util.Map; */ public final class SystemTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopics_CreateOrUpdate.json */ /** * Sample code: SystemTopics_CreateOrUpdate. @@ -5010,7 +5380,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopics_Delete.json */ /** * Sample code: SystemTopics_Delete. @@ -5031,7 +5403,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/SystemTopics_Get + * .json */ /** * Sample code: SystemTopics_Get. @@ -5053,7 +5427,9 @@ public final class SystemTopicsGetByResourceGroupSamples { */ public final class SystemTopicsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopics_ListBySubscription.json */ /** * Sample code: SystemTopics_ListBySubscription. @@ -5074,7 +5450,9 @@ public final class SystemTopicsListSamples { */ public final class SystemTopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopics_ListByResourceGroup.json */ /** * Sample code: SystemTopics_ListByResourceGroup. @@ -5099,7 +5477,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopics_Update.json */ /** * Sample code: SystemTopics_Update. @@ -5138,7 +5518,9 @@ 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/TopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: TopicEventSubscriptions_CreateOrUpdate. @@ -5167,7 +5549,9 @@ public final class TopicEventSubscriptionsCreateOrUpdateSamples { */ public final class TopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_Delete.json */ /** * Sample code: TopicEventSubscriptions_Delete. @@ -5189,7 +5573,9 @@ public final class TopicEventSubscriptionsDeleteSamples { */ public final class TopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_Get.json */ /** * Sample code: TopicEventSubscriptions_Get. @@ -5211,7 +5597,9 @@ public final class TopicEventSubscriptionsGetSamples { */ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: TopicEventSubscriptions_GetDeliveryAttributes. @@ -5235,7 +5623,9 @@ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class TopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: TopicEventSubscriptions_GetFullUrl. @@ -5258,7 +5648,9 @@ public final class TopicEventSubscriptionsGetFullUrlSamples { */ public final class TopicEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_List.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_List.json */ /** * Sample code: TopicEventSubscriptions_List. @@ -5285,7 +5677,9 @@ import java.util.Arrays; */ public final class TopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_Update.json */ /** * Sample code: TopicEventSubscriptions_Update. @@ -5318,7 +5712,9 @@ import java.util.Arrays; */ public final class TopicSpacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicSpaces_CreateOrUpdate.json */ /** * Sample code: TopicSpaces_CreateOrUpdate. @@ -5343,7 +5739,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicSpaces_Delete.json */ /** * Sample code: TopicSpaces_Delete. @@ -5365,7 +5763,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/TopicSpaces_Get. + * json */ /** * Sample code: TopicSpaces_Get. @@ -5388,7 +5788,9 @@ public final class TopicSpacesGetSamples { */ public final class TopicSpacesListByNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_ListByNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicSpaces_ListByNamespace.json */ /** * Sample code: TopicSpaces_ListByNamespace. @@ -5410,7 +5812,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/TopicTypes_Get. + * json */ /** * Sample code: TopicTypes_Get. @@ -5431,7 +5835,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/TopicTypes_List. + * json */ /** * Sample code: TopicTypes_List. @@ -5452,7 +5858,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicTypes_ListEventTypes.json */ /** * Sample code: TopicTypes_ListEventTypes. @@ -5483,7 +5891,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Topics_CreateOrUpdate.json */ /** * Sample code: Topics_CreateOrUpdate. @@ -5504,7 +5914,9 @@ public final class TopicsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_CreateOrUpdateForAzureArc.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Topics_CreateOrUpdateForAzureArc.json */ /** * Sample code: Topics_CreateOrUpdateForAzureArc. @@ -5547,7 +5959,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Topics_Delete. + * json */ /** * Sample code: Topics_Delete. @@ -5568,7 +5982,8 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Topics_Get.json */ /** * Sample code: Topics_Get. @@ -5589,7 +6004,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Topics_ListBySubscription.json */ /** * Sample code: Topics_ListBySubscription. @@ -5610,7 +6027,9 @@ public final class TopicsListSamples { */ public final class TopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Topics_ListByResourceGroup.json */ /** * Sample code: Topics_ListByResourceGroup. @@ -5631,7 +6050,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Topics_ListEventTypes.json */ /** * Sample code: Topics_ListEventTypes. @@ -5654,7 +6075,9 @@ public final class TopicsListEventTypesSamples { */ public final class TopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListSharedAccessKeys.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Topics_ListSharedAccessKeys.json */ /** * Sample code: Topics_ListSharedAccessKeys. @@ -5678,7 +6101,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Topics_RegenerateKey.json */ /** * Sample code: Topics_RegenerateKey. @@ -5709,7 +6134,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Topics_Update. + * json */ /** * Sample code: Topics_Update. @@ -5751,7 +6178,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * VerifiedPartners_Get.json */ /** * Sample code: VerifiedPartners_Get. @@ -5772,7 +6201,9 @@ 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 + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 cba0dadf35592..6bef007e9518d 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-2024-12-preview. https://github.com/Azure/azure-sdk-for-java @@ -46,6 +46,7 @@ 0 0 true + false 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 7c3b6c0b8ea7a..15076716691c0 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 @@ -11,8 +11,8 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; @@ -29,15 +29,15 @@ import com.azure.resourcemanager.eventgrid.implementation.ClientGroupsImpl; import com.azure.resourcemanager.eventgrid.implementation.ClientsImpl; import com.azure.resourcemanager.eventgrid.implementation.DomainEventSubscriptionsImpl; -import com.azure.resourcemanager.eventgrid.implementation.DomainsImpl; import com.azure.resourcemanager.eventgrid.implementation.DomainTopicEventSubscriptionsImpl; import com.azure.resourcemanager.eventgrid.implementation.DomainTopicsImpl; +import com.azure.resourcemanager.eventgrid.implementation.DomainsImpl; import com.azure.resourcemanager.eventgrid.implementation.EventGridManagementClientBuilder; import com.azure.resourcemanager.eventgrid.implementation.EventSubscriptionsImpl; import com.azure.resourcemanager.eventgrid.implementation.ExtensionTopicsImpl; -import com.azure.resourcemanager.eventgrid.implementation.NamespacesImpl; 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; @@ -52,23 +52,23 @@ import com.azure.resourcemanager.eventgrid.implementation.SystemTopicEventSubscriptionsImpl; import com.azure.resourcemanager.eventgrid.implementation.SystemTopicsImpl; import com.azure.resourcemanager.eventgrid.implementation.TopicEventSubscriptionsImpl; -import com.azure.resourcemanager.eventgrid.implementation.TopicsImpl; import com.azure.resourcemanager.eventgrid.implementation.TopicSpacesImpl; import com.azure.resourcemanager.eventgrid.implementation.TopicTypesImpl; +import com.azure.resourcemanager.eventgrid.implementation.TopicsImpl; import com.azure.resourcemanager.eventgrid.implementation.VerifiedPartnersImpl; import com.azure.resourcemanager.eventgrid.models.CaCertificates; import com.azure.resourcemanager.eventgrid.models.Channels; import com.azure.resourcemanager.eventgrid.models.ClientGroups; import com.azure.resourcemanager.eventgrid.models.Clients; import com.azure.resourcemanager.eventgrid.models.DomainEventSubscriptions; -import com.azure.resourcemanager.eventgrid.models.Domains; import com.azure.resourcemanager.eventgrid.models.DomainTopicEventSubscriptions; import com.azure.resourcemanager.eventgrid.models.DomainTopics; +import com.azure.resourcemanager.eventgrid.models.Domains; import com.azure.resourcemanager.eventgrid.models.EventSubscriptions; import com.azure.resourcemanager.eventgrid.models.ExtensionTopics; -import com.azure.resourcemanager.eventgrid.models.Namespaces; 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; @@ -83,9 +83,9 @@ import com.azure.resourcemanager.eventgrid.models.SystemTopicEventSubscriptions; import com.azure.resourcemanager.eventgrid.models.SystemTopics; import com.azure.resourcemanager.eventgrid.models.TopicEventSubscriptions; -import com.azure.resourcemanager.eventgrid.models.Topics; import com.azure.resourcemanager.eventgrid.models.TopicSpaces; import com.azure.resourcemanager.eventgrid.models.TopicTypes; +import com.azure.resourcemanager.eventgrid.models.Topics; import com.azure.resourcemanager.eventgrid.models.VerifiedPartners; import java.time.Duration; import java.time.temporal.ChronoUnit; @@ -325,7 +325,7 @@ public EventGridManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.eventgrid") .append("/") - .append("1.2.0-beta.6"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) 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 index 22015e4f41f7a..cb11cebd1f522 100644 --- 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 @@ -5,23 +5,28 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +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. + * The Azure Active Directory Tenant ID to get the access token that will be included as the bearer token in + * delivery requests. */ - @JsonProperty(value = "azureActiveDirectoryTenantId") private String azureActiveDirectoryTenantId; /* - * The Azure Active Directory Application ID or URI to get the access token that will be included as the bearer token in delivery requests. + * The Azure Active Directory Application ID or URI to get the access token that will be included as the bearer + * token in delivery requests. */ - @JsonProperty(value = "azureActiveDirectoryApplicationIdOrUri") private String azureActiveDirectoryApplicationIdOrUri; /** @@ -83,4 +88,47 @@ public String azureActiveDirectoryApplicationIdOrUri() { */ 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/AzureFunctionEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureFunctionEventSubscriptionDestinationProperties.java index 7c03fe56af581..febd9779cd748 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureFunctionEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureFunctionEventSubscriptionDestinationProperties.java @@ -5,37 +5,38 @@ 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.DeliveryAttributeMapping; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties that represent the Azure Function destination of an event subscription. */ @Fluent -public final class AzureFunctionEventSubscriptionDestinationProperties { +public final class AzureFunctionEventSubscriptionDestinationProperties + implements JsonSerializable { /* * The Azure Resource Id that represents the endpoint of the Azure Function destination of an event subscription. */ - @JsonProperty(value = "resourceId") private String resourceId; /* * Maximum number of events per batch. */ - @JsonProperty(value = "maxEventsPerBatch") private Integer maxEventsPerBatch; /* * Preferred batch size in Kilobytes. */ - @JsonProperty(value = "preferredBatchSizeInKilobytes") private Integer preferredBatchSizeInKilobytes; /* * Delivery attribute details. */ - @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; /** @@ -138,4 +139,57 @@ public void validate() { deliveryAttributeMappings().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeNumberField("maxEventsPerBatch", this.maxEventsPerBatch); + jsonWriter.writeNumberField("preferredBatchSizeInKilobytes", this.preferredBatchSizeInKilobytes); + jsonWriter.writeArrayField("deliveryAttributeMappings", this.deliveryAttributeMappings, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureFunctionEventSubscriptionDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureFunctionEventSubscriptionDestinationProperties 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 AzureFunctionEventSubscriptionDestinationProperties. + */ + public static AzureFunctionEventSubscriptionDestinationProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + AzureFunctionEventSubscriptionDestinationProperties deserializedAzureFunctionEventSubscriptionDestinationProperties + = new AzureFunctionEventSubscriptionDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedAzureFunctionEventSubscriptionDestinationProperties.resourceId = reader.getString(); + } else if ("maxEventsPerBatch".equals(fieldName)) { + deserializedAzureFunctionEventSubscriptionDestinationProperties.maxEventsPerBatch + = reader.getNullable(JsonReader::getInt); + } else if ("preferredBatchSizeInKilobytes".equals(fieldName)) { + deserializedAzureFunctionEventSubscriptionDestinationProperties.preferredBatchSizeInKilobytes + = reader.getNullable(JsonReader::getInt); + } else if ("deliveryAttributeMappings".equals(fieldName)) { + List deliveryAttributeMappings + = reader.readArray(reader1 -> DeliveryAttributeMapping.fromJson(reader1)); + deserializedAzureFunctionEventSubscriptionDestinationProperties.deliveryAttributeMappings + = deliveryAttributeMappings; + } else { + reader.skipChildren(); + } + } + + return deserializedAzureFunctionEventSubscriptionDestinationProperties; + }); + } } 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 d4b8c0013994c..b8b449ecfdc86 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 @@ -7,8 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.CaCertificateProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** @@ -19,15 +22,28 @@ public final class CaCertificateInner extends ProxyResource { /* * The properties of CA certificate. */ - @JsonProperty(value = "properties") private CaCertificateProperties innerProperties; /* - * The system metadata relating to the CaCertificate resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 CaCertificateInner class. */ @@ -44,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. */ @@ -52,6 +68,36 @@ 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; + } + /** * Get the description property: Description for the CA Certificate resource. * @@ -135,4 +181,49 @@ public void validate() { 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 CaCertificateInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CaCertificateInner 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 CaCertificateInner. + */ + public static CaCertificateInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CaCertificateInner deserializedCaCertificateInner = new CaCertificateInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCaCertificateInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCaCertificateInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCaCertificateInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedCaCertificateInner.innerProperties = CaCertificateProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedCaCertificateInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCaCertificateInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateProperties.java index 5fb78fa565b9e..2c81bc1423a01 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateProperties.java @@ -5,43 +5,43 @@ 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.CaCertificateProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** * The properties of CA certificate. */ @Fluent -public final class CaCertificateProperties { +public final class CaCertificateProperties implements JsonSerializable { /* * Description for the CA Certificate resource. */ - @JsonProperty(value = "description") private String description; /* * Base64 encoded PEM (Privacy Enhanced Mail) format certificate data. */ - @JsonProperty(value = "encodedCertificate") private String encodedCertificate; /* * Certificate issue time in UTC. This is a read-only field. */ - @JsonProperty(value = "issueTimeInUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime issueTimeInUtc; /* * Certificate expiry time in UTC. This is a read-only field. */ - @JsonProperty(value = "expiryTimeInUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime expiryTimeInUtc; /* * Provisioning state of the CA Certificate resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private CaCertificateProvisioningState provisioningState; /** @@ -124,4 +124,52 @@ public CaCertificateProvisioningState provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("encodedCertificate", this.encodedCertificate); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CaCertificateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CaCertificateProperties 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 CaCertificateProperties. + */ + public static CaCertificateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CaCertificateProperties deserializedCaCertificateProperties = new CaCertificateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedCaCertificateProperties.description = reader.getString(); + } else if ("encodedCertificate".equals(fieldName)) { + deserializedCaCertificateProperties.encodedCertificate = reader.getString(); + } else if ("issueTimeInUtc".equals(fieldName)) { + deserializedCaCertificateProperties.issueTimeInUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("expiryTimeInUtc".equals(fieldName)) { + deserializedCaCertificateProperties.expiryTimeInUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedCaCertificateProperties.provisioningState + = CaCertificateProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCaCertificateProperties; + }); + } } 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 7aba24c5158b2..a3e319eafce2e 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 @@ -7,12 +7,15 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.ChannelProvisioningState; import com.azure.resourcemanager.eventgrid.models.ChannelType; import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; import com.azure.resourcemanager.eventgrid.models.ReadinessState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** @@ -23,15 +26,28 @@ public final class ChannelInner extends ProxyResource { /* * Properties of the Channel. */ - @JsonProperty(value = "properties") private ChannelProperties innerProperties; /* - * The system metadata relating to Channel resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 ChannelInner class. */ @@ -48,7 +64,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. */ @@ -56,6 +72,36 @@ 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; + } + /** * Get the channelType property: The type of the event channel which represents the direction flow of events. * @@ -237,4 +283,49 @@ public void validate() { 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 ChannelInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChannelInner 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 ChannelInner. + */ + public static ChannelInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChannelInner deserializedChannelInner = new ChannelInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedChannelInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedChannelInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedChannelInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedChannelInner.innerProperties = ChannelProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedChannelInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedChannelInner; + }); + } } 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 ed2bef93b6ae3..3260f46876d3a 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 @@ -5,60 +5,61 @@ 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.ChannelProvisioningState; import com.azure.resourcemanager.eventgrid.models.ChannelType; import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; import com.azure.resourcemanager.eventgrid.models.ReadinessState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; /** * Properties of the Channel. */ @Fluent -public final class ChannelProperties { +public final class ChannelProperties implements JsonSerializable { /* * The type of the event channel which represents the direction flow of events. */ - @JsonProperty(value = "channelType") private ChannelType channelType; /* - * This property should be populated when channelType is PartnerTopic and represents information about the partner topic resource corresponding to the channel. + * This property should be populated when channelType is PartnerTopic and represents information about the partner + * topic resource corresponding to the channel. */ - @JsonProperty(value = "partnerTopicInfo") private PartnerTopicInfo partnerTopicInfo; /* - * This property should be populated when channelType is PartnerDestination and represents information about the partner destination resource corresponding to the channel. + * This property should be populated when channelType is PartnerDestination and represents information about the + * partner destination resource corresponding to the channel. */ - @JsonProperty(value = "partnerDestinationInfo") private PartnerDestinationInfo partnerDestinationInfo; /* * Context or helpful message that can be used during the approval process by the subscriber. */ - @JsonProperty(value = "messageForActivation") private String messageForActivation; /* * Provisioning state of the channel. */ - @JsonProperty(value = "provisioningState") private ChannelProvisioningState provisioningState; /* * The readiness state of the corresponding partner topic. */ - @JsonProperty(value = "readinessState") private ReadinessState readinessState; /* * Expiration time of the channel. If this timer expires while the corresponding partner topic is never activated, * the channel and corresponding partner topic are deleted. */ - @JsonProperty(value = "expirationTimeIfNotActivatedUtc") private OffsetDateTime expirationTimeIfNotActivatedUtc; /** @@ -230,4 +231,65 @@ public void validate() { partnerDestinationInfo().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("channelType", this.channelType == null ? null : this.channelType.toString()); + jsonWriter.writeJsonField("partnerTopicInfo", this.partnerTopicInfo); + jsonWriter.writeJsonField("partnerDestinationInfo", this.partnerDestinationInfo); + jsonWriter.writeStringField("messageForActivation", this.messageForActivation); + jsonWriter.writeStringField("provisioningState", + this.provisioningState == null ? null : this.provisioningState.toString()); + jsonWriter.writeStringField("readinessState", + this.readinessState == null ? null : this.readinessState.toString()); + jsonWriter.writeStringField("expirationTimeIfNotActivatedUtc", + this.expirationTimeIfNotActivatedUtc == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationTimeIfNotActivatedUtc)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChannelProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChannelProperties 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 ChannelProperties. + */ + public static ChannelProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChannelProperties deserializedChannelProperties = new ChannelProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("channelType".equals(fieldName)) { + deserializedChannelProperties.channelType = ChannelType.fromString(reader.getString()); + } else if ("partnerTopicInfo".equals(fieldName)) { + deserializedChannelProperties.partnerTopicInfo = PartnerTopicInfo.fromJson(reader); + } else if ("partnerDestinationInfo".equals(fieldName)) { + deserializedChannelProperties.partnerDestinationInfo = PartnerDestinationInfo.fromJson(reader); + } else if ("messageForActivation".equals(fieldName)) { + deserializedChannelProperties.messageForActivation = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedChannelProperties.provisioningState + = ChannelProvisioningState.fromString(reader.getString()); + } else if ("readinessState".equals(fieldName)) { + deserializedChannelProperties.readinessState = ReadinessState.fromString(reader.getString()); + } else if ("expirationTimeIfNotActivatedUtc".equals(fieldName)) { + deserializedChannelProperties.expirationTimeIfNotActivatedUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedChannelProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelUpdateParametersProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelUpdateParametersProperties.java index cffa05e8af2ae..3b090b6fcd07a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelUpdateParametersProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelUpdateParametersProperties.java @@ -5,33 +5,37 @@ 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.PartnerUpdateDestinationInfo; import com.azure.resourcemanager.eventgrid.models.PartnerUpdateTopicInfo; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; /** * Properties of the channel update parameters. */ @Fluent -public final class ChannelUpdateParametersProperties { +public final class ChannelUpdateParametersProperties implements JsonSerializable { /* - * Expiration time of the channel. If this timer expires while the corresponding partner topic or partner destination is never activated, + * Expiration time of the channel. If this timer expires while the corresponding partner topic or partner + * destination is never activated, * the channel and corresponding partner topic or partner destination are deleted. */ - @JsonProperty(value = "expirationTimeIfNotActivatedUtc") private OffsetDateTime expirationTimeIfNotActivatedUtc; /* * Partner destination properties which can be updated if the channel is of type PartnerDestination. */ - @JsonProperty(value = "partnerDestinationInfo") private PartnerUpdateDestinationInfo partnerDestinationInfo; /* * Partner topic properties which can be updated if the channel is of type PartnerTopic. */ - @JsonProperty(value = "partnerTopicInfo") private PartnerUpdateTopicInfo partnerTopicInfo; /** @@ -123,4 +127,53 @@ public void validate() { partnerTopicInfo().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("expirationTimeIfNotActivatedUtc", + this.expirationTimeIfNotActivatedUtc == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationTimeIfNotActivatedUtc)); + jsonWriter.writeJsonField("partnerDestinationInfo", this.partnerDestinationInfo); + jsonWriter.writeJsonField("partnerTopicInfo", this.partnerTopicInfo); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChannelUpdateParametersProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChannelUpdateParametersProperties 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 ChannelUpdateParametersProperties. + */ + public static ChannelUpdateParametersProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChannelUpdateParametersProperties deserializedChannelUpdateParametersProperties + = new ChannelUpdateParametersProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expirationTimeIfNotActivatedUtc".equals(fieldName)) { + deserializedChannelUpdateParametersProperties.expirationTimeIfNotActivatedUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("partnerDestinationInfo".equals(fieldName)) { + deserializedChannelUpdateParametersProperties.partnerDestinationInfo + = PartnerUpdateDestinationInfo.fromJson(reader); + } else if ("partnerTopicInfo".equals(fieldName)) { + deserializedChannelUpdateParametersProperties.partnerTopicInfo + = PartnerUpdateTopicInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedChannelUpdateParametersProperties; + }); + } } 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 76453747c2009..8df3ba013b331 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 @@ -7,8 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.ClientGroupProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The Client group resource. @@ -18,15 +21,28 @@ public final class ClientGroupInner extends ProxyResource { /* * The properties of client group. */ - @JsonProperty(value = "properties") private ClientGroupProperties innerProperties; /* - * The system metadata relating to the ClientGroup resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 ClientGroupInner class. */ @@ -43,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. */ @@ -51,6 +67,36 @@ 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; + } + /** * Get the description property: Description for the Client Group resource. * @@ -118,4 +164,49 @@ public void validate() { 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 ClientGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClientGroupInner 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 ClientGroupInner. + */ + public static ClientGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClientGroupInner deserializedClientGroupInner = new ClientGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedClientGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedClientGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedClientGroupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedClientGroupInner.innerProperties = ClientGroupProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedClientGroupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedClientGroupInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupProperties.java index eeb5e9906c82c..51ffba927019f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupProperties.java @@ -5,31 +5,32 @@ 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.ClientGroupProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties of client group. */ @Fluent -public final class ClientGroupProperties { +public final class ClientGroupProperties implements JsonSerializable { /* * Description for the Client Group resource. */ - @JsonProperty(value = "description") private String description; /* * The grouping query for the clients. * Example : attributes.keyName IN ['a', 'b', 'c']. */ - @JsonProperty(value = "query") private String query; /* * Provisioning state of the ClientGroup resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ClientGroupProvisioningState provisioningState; /** @@ -96,4 +97,46 @@ public ClientGroupProvisioningState provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("query", this.query); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClientGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClientGroupProperties 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 ClientGroupProperties. + */ + public static ClientGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClientGroupProperties deserializedClientGroupProperties = new ClientGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedClientGroupProperties.description = reader.getString(); + } else if ("query".equals(fieldName)) { + deserializedClientGroupProperties.query = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedClientGroupProperties.provisioningState + = ClientGroupProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedClientGroupProperties; + }); + } } 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 64187718bf1bf..ba0c340429351 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 @@ -7,10 +7,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.ClientCertificateAuthentication; import com.azure.resourcemanager.eventgrid.models.ClientProvisioningState; import com.azure.resourcemanager.eventgrid.models.ClientState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -21,15 +24,28 @@ public final class ClientInner extends ProxyResource { /* * The properties of client. */ - @JsonProperty(value = "properties") private ClientProperties innerProperties; /* - * The system metadata relating to the Client resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 ClientInner class. */ @@ -46,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. */ @@ -54,6 +70,36 @@ 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; + } + /** * Get the description property: Description for the Client resource. * @@ -195,4 +241,49 @@ public void validate() { 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 ClientInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClientInner 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 ClientInner. + */ + public static ClientInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClientInner deserializedClientInner = new ClientInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedClientInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedClientInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedClientInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedClientInner.innerProperties = ClientProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedClientInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedClientInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientProperties.java index 9ee9d429c9bac..0b46280361fa0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientProperties.java @@ -5,40 +5,39 @@ 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.ClientCertificateAuthentication; import com.azure.resourcemanager.eventgrid.models.ClientProvisioningState; import com.azure.resourcemanager.eventgrid.models.ClientState; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** * The properties of client. */ @Fluent -public final class ClientProperties { +public final class ClientProperties implements JsonSerializable { /* * Description for the Client resource. */ - @JsonProperty(value = "description") private String description; /* * The name presented by the client for authentication. The default value is the name of the resource. */ - @JsonProperty(value = "authenticationName") private String authenticationName; /* * The client certificate authentication information. */ - @JsonProperty(value = "clientCertificateAuthentication") private ClientCertificateAuthentication clientCertificateAuthentication; /* * Indicates if the client is enabled or not. Default value is Enabled. */ - @JsonProperty(value = "state") private ClientState state; /* @@ -46,14 +45,11 @@ public final class ClientProperties { * Example: * "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] } */ - @JsonProperty(value = "attributes") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map attributes; /* * Provisioning state of the Client resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ClientProvisioningState provisioningState; /** @@ -188,4 +184,57 @@ public void validate() { clientCertificateAuthentication().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("authenticationName", this.authenticationName); + jsonWriter.writeJsonField("clientCertificateAuthentication", this.clientCertificateAuthentication); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeMapField("attributes", this.attributes, (writer, element) -> writer.writeUntyped(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClientProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClientProperties 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 ClientProperties. + */ + public static ClientProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClientProperties deserializedClientProperties = new ClientProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedClientProperties.description = reader.getString(); + } else if ("authenticationName".equals(fieldName)) { + deserializedClientProperties.authenticationName = reader.getString(); + } else if ("clientCertificateAuthentication".equals(fieldName)) { + deserializedClientProperties.clientCertificateAuthentication + = ClientCertificateAuthentication.fromJson(reader); + } else if ("state".equals(fieldName)) { + deserializedClientProperties.state = ClientState.fromString(reader.getString()); + } else if ("attributes".equals(fieldName)) { + Map attributes = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedClientProperties.attributes = attributes; + } else if ("provisioningState".equals(fieldName)) { + deserializedClientProperties.provisioningState + = ClientProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedClientProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CustomDomainOwnershipValidationResultInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CustomDomainOwnershipValidationResultInner.java index 3e858d6b142d6..410ab9de52982 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CustomDomainOwnershipValidationResultInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CustomDomainOwnershipValidationResultInner.java @@ -5,25 +5,28 @@ 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.CustomDomainConfiguration; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Namespace custom domain ownership validation result. */ @Fluent -public final class CustomDomainOwnershipValidationResultInner { +public final class CustomDomainOwnershipValidationResultInner + implements JsonSerializable { /* * List of custom domain configurations for the namespace under topics configuration. */ - @JsonProperty(value = "customDomainsForTopicsConfiguration") private List customDomainsForTopicsConfiguration; /* * List of custom domain configurations for the namespace under topic spaces configuration. */ - @JsonProperty(value = "customDomainsForTopicSpacesConfiguration") private List customDomainsForTopicSpacesConfiguration; /** @@ -91,4 +94,52 @@ public void validate() { customDomainsForTopicSpacesConfiguration().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("customDomainsForTopicsConfiguration", this.customDomainsForTopicsConfiguration, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("customDomainsForTopicSpacesConfiguration", + this.customDomainsForTopicSpacesConfiguration, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CustomDomainOwnershipValidationResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomDomainOwnershipValidationResultInner 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 CustomDomainOwnershipValidationResultInner. + */ + public static CustomDomainOwnershipValidationResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomDomainOwnershipValidationResultInner deserializedCustomDomainOwnershipValidationResultInner + = new CustomDomainOwnershipValidationResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("customDomainsForTopicsConfiguration".equals(fieldName)) { + List customDomainsForTopicsConfiguration + = reader.readArray(reader1 -> CustomDomainConfiguration.fromJson(reader1)); + deserializedCustomDomainOwnershipValidationResultInner.customDomainsForTopicsConfiguration + = customDomainsForTopicsConfiguration; + } else if ("customDomainsForTopicSpacesConfiguration".equals(fieldName)) { + List customDomainsForTopicSpacesConfiguration + = reader.readArray(reader1 -> CustomDomainConfiguration.fromJson(reader1)); + deserializedCustomDomainOwnershipValidationResultInner.customDomainsForTopicSpacesConfiguration + = customDomainsForTopicSpacesConfiguration; + } else { + reader.skipChildren(); + } + } + + return deserializedCustomDomainOwnershipValidationResultInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DeliveryAttributeListResultInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DeliveryAttributeListResultInner.java index efb28d2f2d5f5..697d57df9b6e3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DeliveryAttributeListResultInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DeliveryAttributeListResultInner.java @@ -5,19 +5,22 @@ 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.DeliveryAttributeMapping; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the Get delivery attributes operation. */ @Fluent -public final class DeliveryAttributeListResultInner { +public final class DeliveryAttributeListResultInner implements JsonSerializable { /* * A collection of DeliveryAttributeMapping */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,43 @@ public void validate() { 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)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeliveryAttributeListResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeliveryAttributeListResultInner 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 DeliveryAttributeListResultInner. + */ + public static DeliveryAttributeListResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeliveryAttributeListResultInner deserializedDeliveryAttributeListResultInner + = new DeliveryAttributeListResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DeliveryAttributeMapping.fromJson(reader1)); + deserializedDeliveryAttributeListResultInner.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedDeliveryAttributeListResultInner; + }); + } } 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 2677c90ac1d57..0f3b7128fdee0 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 @@ -7,6 +7,9 @@ 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.DataResidencyBoundary; import com.azure.resourcemanager.eventgrid.models.DomainProvisioningState; import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; @@ -17,7 +20,7 @@ import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.ResourceSku; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -29,27 +32,38 @@ public final class DomainInner extends Resource { /* * Properties of the Event Grid Domain resource. */ - @JsonProperty(value = "properties") private DomainProperties innerProperties; /* * The Sku pricing tier for the Event Grid Domain resource. */ - @JsonProperty(value = "sku") private ResourceSku sku; /* * Identity information for the Event Grid Domain resource. */ - @JsonProperty(value = "identity") private IdentityInfo identity; /* - * The system metadata relating to the Event Grid Domain resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 DomainInner class. */ @@ -106,7 +120,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. */ @@ -114,6 +128,36 @@ 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} */ @@ -484,4 +528,62 @@ public void validate() { identity().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); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DomainInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainInner 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 DomainInner. + */ + public static DomainInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DomainInner deserializedDomainInner = new DomainInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDomainInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDomainInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDomainInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedDomainInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + 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)) { + deserializedDomainInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDomainInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainProperties.java index f57c269106b9d..d8a1917b827e5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainProperties.java @@ -5,6 +5,10 @@ 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.DataResidencyBoundary; import com.azure.resourcemanager.eventgrid.models.DomainProvisioningState; import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; @@ -13,110 +17,112 @@ import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Properties of the Event Grid Domain Resource. */ @Fluent -public final class DomainProperties { +public final class DomainProperties implements JsonSerializable { /* * List of private endpoint connections. */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; /* * Provisioning state of the Event Grid Domain Resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private DomainProvisioningState provisioningState; /* * Minimum TLS version of the publisher allowed to publish to this domain */ - @JsonProperty(value = "minimumTlsVersionAllowed") private TlsVersion minimumTlsVersionAllowed; /* * Endpoint for the Event Grid Domain Resource which is used for publishing the events. */ - @JsonProperty(value = "endpoint", access = JsonProperty.Access.WRITE_ONLY) private String endpoint; /* - * This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain Resource. + * This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain + * Resource. */ - @JsonProperty(value = "inputSchema") private InputSchema inputSchema; /* - * Event Type Information for the domain. This information is provided by the publisher and can be used by the + * Event Type Information for the domain. This information is provided by the publisher and can be used by the * subscriber to view different types of events that are published. */ - @JsonProperty(value = "eventTypeInfo") private EventTypeInfo eventTypeInfo; /* * Information about the InputSchemaMapping which specified the info about mapping event payload. */ - @JsonProperty(value = "inputSchemaMapping") private InputSchemaMapping inputSchemaMapping; /* * Metric resource id for the Event Grid Domain Resource. */ - @JsonProperty(value = "metricResourceId", access = JsonProperty.Access.WRITE_ONLY) private String metricResourceId; /* * This determines if traffic is allowed over public network. By default it is enabled. - * You can further restrict to specific IPs by configuring + * You can further restrict to specific IPs by configuring */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ - @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* - * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the domain. + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the domain. */ - @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; /* - * This Boolean is used to specify the creation mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain resource. - * In this context, creation of domain topic can be auto-managed (when true) or self-managed (when false). The default value for this property is true. - * When this property is null or set to true, Event Grid is responsible of automatically creating the domain topic when the first event subscription is - * created at the scope of the domain topic. If this property is set to false, then creating the first event subscription will require creating a domain topic - * by the user. The self-management mode can be used if the user wants full control of when the domain topic is created, while auto-managed mode provides the - * flexibility to perform less operations and manage fewer resources by the user. Also, note that in auto-managed creation mode, user is allowed to create the + * This Boolean is used to specify the creation mechanism for 'all' the Event Grid Domain Topics associated with + * this Event Grid Domain resource. + * In this context, creation of domain topic can be auto-managed (when true) or self-managed (when false). The + * default value for this property is true. + * When this property is null or set to true, Event Grid is responsible of automatically creating the domain topic + * when the first event subscription is + * created at the scope of the domain topic. If this property is set to false, then creating the first event + * subscription will require creating a domain topic + * by the user. The self-management mode can be used if the user wants full control of when the domain topic is + * created, while auto-managed mode provides the + * flexibility to perform less operations and manage fewer resources by the user. Also, note that in auto-managed + * creation mode, user is allowed to create the * domain topic on demand if needed. */ - @JsonProperty(value = "autoCreateTopicWithFirstSubscription") private Boolean autoCreateTopicWithFirstSubscription; /* - * This Boolean is used to specify the deletion mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain resource. - * In this context, deletion of domain topic can be auto-managed (when true) or self-managed (when false). The default value for this property is true. - * When this property is set to true, Event Grid is responsible of automatically deleting the domain topic when the last event subscription at the scope - * of the domain topic is deleted. If this property is set to false, then the user needs to manually delete the domain topic when it is no longer needed - * (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The self-management mode can be used if the user wants full - * control of when the domain topic needs to be deleted, while auto-managed mode provides the flexibility to perform less operations and manage fewer + * This Boolean is used to specify the deletion mechanism for 'all' the Event Grid Domain Topics associated with + * this Event Grid Domain resource. + * In this context, deletion of domain topic can be auto-managed (when true) or self-managed (when false). The + * default value for this property is true. + * When this property is set to true, Event Grid is responsible of automatically deleting the domain topic when the + * last event subscription at the scope + * of the domain topic is deleted. If this property is set to false, then the user needs to manually delete the + * domain topic when it is no longer needed + * (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The self-management mode + * can be used if the user wants full + * control of when the domain topic needs to be deleted, while auto-managed mode provides the flexibility to perform + * less operations and manage fewer * resources by the user. */ - @JsonProperty(value = "autoDeleteTopicWithLastSubscription") private Boolean autoDeleteTopicWithLastSubscription; /* * Data Residency Boundary of the resource. */ - @JsonProperty(value = "dataResidencyBoundary") private DataResidencyBoundary dataResidencyBoundary; /** @@ -450,4 +456,87 @@ public void validate() { inboundIpRules().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("minimumTlsVersionAllowed", + this.minimumTlsVersionAllowed == null ? null : this.minimumTlsVersionAllowed.toString()); + jsonWriter.writeStringField("inputSchema", this.inputSchema == null ? null : this.inputSchema.toString()); + jsonWriter.writeJsonField("eventTypeInfo", this.eventTypeInfo); + jsonWriter.writeJsonField("inputSchemaMapping", this.inputSchemaMapping); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeArrayField("inboundIpRules", this.inboundIpRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth); + jsonWriter.writeBooleanField("autoCreateTopicWithFirstSubscription", this.autoCreateTopicWithFirstSubscription); + jsonWriter.writeBooleanField("autoDeleteTopicWithLastSubscription", this.autoDeleteTopicWithLastSubscription); + jsonWriter.writeStringField("dataResidencyBoundary", + this.dataResidencyBoundary == null ? null : this.dataResidencyBoundary.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DomainProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainProperties 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 DomainProperties. + */ + public static DomainProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DomainProperties deserializedDomainProperties = new DomainProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedDomainProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("provisioningState".equals(fieldName)) { + deserializedDomainProperties.provisioningState + = DomainProvisioningState.fromString(reader.getString()); + } else if ("minimumTlsVersionAllowed".equals(fieldName)) { + deserializedDomainProperties.minimumTlsVersionAllowed = TlsVersion.fromString(reader.getString()); + } else if ("endpoint".equals(fieldName)) { + deserializedDomainProperties.endpoint = reader.getString(); + } else if ("inputSchema".equals(fieldName)) { + deserializedDomainProperties.inputSchema = InputSchema.fromString(reader.getString()); + } else if ("eventTypeInfo".equals(fieldName)) { + deserializedDomainProperties.eventTypeInfo = EventTypeInfo.fromJson(reader); + } else if ("inputSchemaMapping".equals(fieldName)) { + deserializedDomainProperties.inputSchemaMapping = InputSchemaMapping.fromJson(reader); + } else if ("metricResourceId".equals(fieldName)) { + deserializedDomainProperties.metricResourceId = reader.getString(); + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedDomainProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("inboundIpRules".equals(fieldName)) { + List inboundIpRules = reader.readArray(reader1 -> InboundIpRule.fromJson(reader1)); + deserializedDomainProperties.inboundIpRules = inboundIpRules; + } else if ("disableLocalAuth".equals(fieldName)) { + deserializedDomainProperties.disableLocalAuth = reader.getNullable(JsonReader::getBoolean); + } else if ("autoCreateTopicWithFirstSubscription".equals(fieldName)) { + deserializedDomainProperties.autoCreateTopicWithFirstSubscription + = reader.getNullable(JsonReader::getBoolean); + } else if ("autoDeleteTopicWithLastSubscription".equals(fieldName)) { + deserializedDomainProperties.autoDeleteTopicWithLastSubscription + = reader.getNullable(JsonReader::getBoolean); + } else if ("dataResidencyBoundary".equals(fieldName)) { + deserializedDomainProperties.dataResidencyBoundary + = DataResidencyBoundary.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDomainProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainSharedAccessKeysInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainSharedAccessKeysInner.java index 348b3f8643586..7e1daa31d8257 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainSharedAccessKeysInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainSharedAccessKeysInner.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Shared access keys of the Domain. */ @Fluent -public final class DomainSharedAccessKeysInner { +public final class DomainSharedAccessKeysInner implements JsonSerializable { /* * Shared access key1 for the domain. */ - @JsonProperty(value = "key1") private String key1; /* * Shared access key2 for the domain. */ - @JsonProperty(value = "key2") private String key2; /** @@ -77,4 +79,43 @@ public DomainSharedAccessKeysInner withKey2(String key2) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key1", this.key1); + jsonWriter.writeStringField("key2", this.key2); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DomainSharedAccessKeysInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainSharedAccessKeysInner 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 DomainSharedAccessKeysInner. + */ + public static DomainSharedAccessKeysInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DomainSharedAccessKeysInner deserializedDomainSharedAccessKeysInner = new DomainSharedAccessKeysInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key1".equals(fieldName)) { + deserializedDomainSharedAccessKeysInner.key1 = reader.getString(); + } else if ("key2".equals(fieldName)) { + deserializedDomainSharedAccessKeysInner.key2 = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDomainSharedAccessKeysInner; + }); + } } 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 38bb1baaea56e..99475d92b49c0 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 @@ -7,8 +7,11 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; 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.DomainTopicProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Domain Topic. @@ -18,15 +21,28 @@ public final class DomainTopicInner extends ProxyResource { /* * Properties of the Domain Topic. */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private DomainTopicProperties innerProperties; /* - * The system metadata relating to Domain Topic resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 DomainTopicInner class. */ @@ -43,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. */ @@ -51,6 +67,36 @@ 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; + } + /** * Get the provisioningState property: Provisioning state of the domain topic. * @@ -70,4 +116,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DomainTopicInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainTopicInner 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 DomainTopicInner. + */ + public static DomainTopicInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DomainTopicInner deserializedDomainTopicInner = new DomainTopicInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDomainTopicInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDomainTopicInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDomainTopicInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDomainTopicInner.innerProperties = DomainTopicProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedDomainTopicInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDomainTopicInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicProperties.java index 971f495cb0042..d88d694749ab5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicProperties.java @@ -5,18 +5,21 @@ package com.azure.resourcemanager.eventgrid.fluent.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 com.azure.resourcemanager.eventgrid.models.DomainTopicProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Properties of the Domain Topic. */ @Immutable -public final class DomainTopicProperties { +public final class DomainTopicProperties implements JsonSerializable { /* * Provisioning state of the domain topic. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private DomainTopicProvisioningState provisioningState; /** @@ -41,4 +44,40 @@ public DomainTopicProvisioningState provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DomainTopicProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainTopicProperties 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 DomainTopicProperties. + */ + public static DomainTopicProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DomainTopicProperties deserializedDomainTopicProperties = new DomainTopicProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedDomainTopicProperties.provisioningState + = DomainTopicProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDomainTopicProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainUpdateParameterProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainUpdateParameterProperties.java index a0ffde4dd6148..49c4c0bc60707 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainUpdateParameterProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainUpdateParameterProperties.java @@ -5,78 +5,90 @@ 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.DataResidencyBoundary; import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Information of domain update parameter properties. */ @Fluent -public final class DomainUpdateParameterProperties { +public final class DomainUpdateParameterProperties implements JsonSerializable { /* - * This determines if traffic is allowed over public network. By default it is enabled. - * You can further restrict to specific IPs by configuring + * This determines if traffic is allowed over public network. By default it is enabled. + * You can further restrict to specific IPs by configuring */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ - @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* * Minimum TLS version of the publisher allowed to publish to this domain */ - @JsonProperty(value = "minimumTlsVersionAllowed") private TlsVersion minimumTlsVersionAllowed; /* - * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the domain. + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the domain. */ - @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; /* - * This Boolean is used to specify the creation mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain resource. - * In this context, creation of domain topic can be auto-managed (when true) or self-managed (when false). The default value for this property is true. - * When this property is null or set to true, Event Grid is responsible of automatically creating the domain topic when the first event subscription is - * created at the scope of the domain topic. If this property is set to false, then creating the first event subscription will require creating a domain topic - * by the user. The self-management mode can be used if the user wants full control of when the domain topic is created, while auto-managed mode provides the - * flexibility to perform less operations and manage fewer resources by the user. Also, note that in auto-managed creation mode, user is allowed to create the + * This Boolean is used to specify the creation mechanism for 'all' the Event Grid Domain Topics associated with + * this Event Grid Domain resource. + * In this context, creation of domain topic can be auto-managed (when true) or self-managed (when false). The + * default value for this property is true. + * When this property is null or set to true, Event Grid is responsible of automatically creating the domain topic + * when the first event subscription is + * created at the scope of the domain topic. If this property is set to false, then creating the first event + * subscription will require creating a domain topic + * by the user. The self-management mode can be used if the user wants full control of when the domain topic is + * created, while auto-managed mode provides the + * flexibility to perform less operations and manage fewer resources by the user. Also, note that in auto-managed + * creation mode, user is allowed to create the * domain topic on demand if needed. */ - @JsonProperty(value = "autoCreateTopicWithFirstSubscription") private Boolean autoCreateTopicWithFirstSubscription; /* - * This Boolean is used to specify the deletion mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain resource. - * In this context, deletion of domain topic can be auto-managed (when true) or self-managed (when false). The default value for this property is true. - * When this property is set to true, Event Grid is responsible of automatically deleting the domain topic when the last event subscription at the scope - * of the domain topic is deleted. If this property is set to false, then the user needs to manually delete the domain topic when it is no longer needed - * (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The self-management mode can be used if the user wants full - * control of when the domain topic needs to be deleted, while auto-managed mode provides the flexibility to perform less operations and manage fewer + * This Boolean is used to specify the deletion mechanism for 'all' the Event Grid Domain Topics associated with + * this Event Grid Domain resource. + * In this context, deletion of domain topic can be auto-managed (when true) or self-managed (when false). The + * default value for this property is true. + * When this property is set to true, Event Grid is responsible of automatically deleting the domain topic when the + * last event subscription at the scope + * of the domain topic is deleted. If this property is set to false, then the user needs to manually delete the + * domain topic when it is no longer needed + * (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The self-management mode + * can be used if the user wants full + * control of when the domain topic needs to be deleted, while auto-managed mode provides the flexibility to perform + * less operations and manage fewer * resources by the user. */ - @JsonProperty(value = "autoDeleteTopicWithLastSubscription") private Boolean autoDeleteTopicWithLastSubscription; /* * The data residency boundary for the domain. */ - @JsonProperty(value = "dataResidencyBoundary") private DataResidencyBoundary dataResidencyBoundary; /* * The eventTypeInfo for the domain. */ - @JsonProperty(value = "eventTypeInfo") private EventTypeInfo eventTypeInfo; /** @@ -324,4 +336,73 @@ public void validate() { eventTypeInfo().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeArrayField("inboundIpRules", this.inboundIpRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("minimumTlsVersionAllowed", + this.minimumTlsVersionAllowed == null ? null : this.minimumTlsVersionAllowed.toString()); + jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth); + jsonWriter.writeBooleanField("autoCreateTopicWithFirstSubscription", this.autoCreateTopicWithFirstSubscription); + jsonWriter.writeBooleanField("autoDeleteTopicWithLastSubscription", this.autoDeleteTopicWithLastSubscription); + jsonWriter.writeStringField("dataResidencyBoundary", + this.dataResidencyBoundary == null ? null : this.dataResidencyBoundary.toString()); + jsonWriter.writeJsonField("eventTypeInfo", this.eventTypeInfo); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DomainUpdateParameterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainUpdateParameterProperties 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 DomainUpdateParameterProperties. + */ + public static DomainUpdateParameterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DomainUpdateParameterProperties deserializedDomainUpdateParameterProperties + = new DomainUpdateParameterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicNetworkAccess".equals(fieldName)) { + deserializedDomainUpdateParameterProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("inboundIpRules".equals(fieldName)) { + List inboundIpRules = reader.readArray(reader1 -> InboundIpRule.fromJson(reader1)); + deserializedDomainUpdateParameterProperties.inboundIpRules = inboundIpRules; + } else if ("minimumTlsVersionAllowed".equals(fieldName)) { + deserializedDomainUpdateParameterProperties.minimumTlsVersionAllowed + = TlsVersion.fromString(reader.getString()); + } else if ("disableLocalAuth".equals(fieldName)) { + deserializedDomainUpdateParameterProperties.disableLocalAuth + = reader.getNullable(JsonReader::getBoolean); + } else if ("autoCreateTopicWithFirstSubscription".equals(fieldName)) { + deserializedDomainUpdateParameterProperties.autoCreateTopicWithFirstSubscription + = reader.getNullable(JsonReader::getBoolean); + } else if ("autoDeleteTopicWithLastSubscription".equals(fieldName)) { + deserializedDomainUpdateParameterProperties.autoDeleteTopicWithLastSubscription + = reader.getNullable(JsonReader::getBoolean); + } else if ("dataResidencyBoundary".equals(fieldName)) { + deserializedDomainUpdateParameterProperties.dataResidencyBoundary + = DataResidencyBoundary.fromString(reader.getString()); + } else if ("eventTypeInfo".equals(fieldName)) { + deserializedDomainUpdateParameterProperties.eventTypeInfo = EventTypeInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDomainUpdateParameterProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DynamicDeliveryAttributeMappingProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DynamicDeliveryAttributeMappingProperties.java index c471f155b7cb3..cd82a209c83d1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DynamicDeliveryAttributeMappingProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DynamicDeliveryAttributeMappingProperties.java @@ -5,17 +5,21 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 dynamic delivery attribute mapping. */ @Fluent -public final class DynamicDeliveryAttributeMappingProperties { +public final class DynamicDeliveryAttributeMappingProperties + implements JsonSerializable { /* * JSON path in the event which contains attribute value. */ - @JsonProperty(value = "sourceField") private String sourceField; /** @@ -51,4 +55,41 @@ public DynamicDeliveryAttributeMappingProperties withSourceField(String sourceFi */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceField", this.sourceField); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DynamicDeliveryAttributeMappingProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DynamicDeliveryAttributeMappingProperties 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 DynamicDeliveryAttributeMappingProperties. + */ + public static DynamicDeliveryAttributeMappingProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DynamicDeliveryAttributeMappingProperties deserializedDynamicDeliveryAttributeMappingProperties + = new DynamicDeliveryAttributeMappingProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceField".equals(fieldName)) { + deserializedDynamicDeliveryAttributeMappingProperties.sourceField = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDynamicDeliveryAttributeMappingProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventHubEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventHubEventSubscriptionDestinationProperties.java index a26a746cc3452..3e85fad351384 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventHubEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventHubEventSubscriptionDestinationProperties.java @@ -5,25 +5,28 @@ 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.DeliveryAttributeMapping; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties for a event hub destination. */ @Fluent -public final class EventHubEventSubscriptionDestinationProperties { +public final class EventHubEventSubscriptionDestinationProperties + implements JsonSerializable { /* * The Azure Resource Id that represents the endpoint of an Event Hub destination of an event subscription. */ - @JsonProperty(value = "resourceId") private String resourceId; /* * Delivery attribute details. */ - @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; /** @@ -85,4 +88,48 @@ public void validate() { deliveryAttributeMappings().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeArrayField("deliveryAttributeMappings", this.deliveryAttributeMappings, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventHubEventSubscriptionDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventHubEventSubscriptionDestinationProperties 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 EventHubEventSubscriptionDestinationProperties. + */ + public static EventHubEventSubscriptionDestinationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventHubEventSubscriptionDestinationProperties deserializedEventHubEventSubscriptionDestinationProperties + = new EventHubEventSubscriptionDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedEventHubEventSubscriptionDestinationProperties.resourceId = reader.getString(); + } else if ("deliveryAttributeMappings".equals(fieldName)) { + List deliveryAttributeMappings + = reader.readArray(reader1 -> DeliveryAttributeMapping.fromJson(reader1)); + deserializedEventHubEventSubscriptionDestinationProperties.deliveryAttributeMappings + = deliveryAttributeMappings; + } else { + reader.skipChildren(); + } + } + + return deserializedEventHubEventSubscriptionDestinationProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionFullUrlInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionFullUrlInner.java index 234309cddcf29..9a748ceaf99f0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionFullUrlInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionFullUrlInner.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Full endpoint URL of an event subscription. */ @Fluent -public final class EventSubscriptionFullUrlInner { +public final class EventSubscriptionFullUrlInner implements JsonSerializable { /* * The URL that represents the endpoint of the destination of an event subscription. */ - @JsonProperty(value = "endpointUrl") private String endpointUrl; /** @@ -51,4 +54,41 @@ public EventSubscriptionFullUrlInner withEndpointUrl(String endpointUrl) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("endpointUrl", this.endpointUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventSubscriptionFullUrlInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventSubscriptionFullUrlInner 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 EventSubscriptionFullUrlInner. + */ + public static EventSubscriptionFullUrlInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventSubscriptionFullUrlInner deserializedEventSubscriptionFullUrlInner + = new EventSubscriptionFullUrlInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointUrl".equals(fieldName)) { + deserializedEventSubscriptionFullUrlInner.endpointUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEventSubscriptionFullUrlInner; + }); + } } 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 a192bd9555b0f..97cdd1405fec1 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 @@ -7,6 +7,9 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.DeadLetterDestination; import com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity; import com.azure.resourcemanager.eventgrid.models.DeliveryWithResourceIdentity; @@ -15,7 +18,7 @@ import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionProvisioningState; import com.azure.resourcemanager.eventgrid.models.RetryPolicy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; @@ -27,15 +30,28 @@ public final class EventSubscriptionInner extends ProxyResource { /* * Properties of the event subscription. */ - @JsonProperty(value = "properties") private EventSubscriptionProperties innerProperties; /* - * The system metadata relating to Event Subscription resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 EventSubscriptionInner class. */ @@ -52,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. */ @@ -60,6 +76,36 @@ 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; + } + /** * Get the topic property: Name of the topic of the event subscription. * @@ -323,4 +369,49 @@ public void validate() { 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 EventSubscriptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventSubscriptionInner 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 EventSubscriptionInner. + */ + public static EventSubscriptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventSubscriptionInner deserializedEventSubscriptionInner = new EventSubscriptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEventSubscriptionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEventSubscriptionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEventSubscriptionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedEventSubscriptionInner.innerProperties = EventSubscriptionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedEventSubscriptionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEventSubscriptionInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionProperties.java index d9ef242338797..fa8ce7d8d4933 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionProperties.java @@ -5,6 +5,11 @@ 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.DeadLetterDestination; import com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity; import com.azure.resourcemanager.eventgrid.models.DeliveryWithResourceIdentity; @@ -13,83 +18,80 @@ import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionProvisioningState; import com.azure.resourcemanager.eventgrid.models.RetryPolicy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; import java.util.List; /** * Properties of the Event Subscription. */ @Fluent -public final class EventSubscriptionProperties { +public final class EventSubscriptionProperties implements JsonSerializable { /* * Name of the topic of the event subscription. */ - @JsonProperty(value = "topic", access = JsonProperty.Access.WRITE_ONLY) private String topic; /* * Provisioning state of the event subscription. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private EventSubscriptionProvisioningState provisioningState; /* * Information about the destination where events have to be delivered for the event subscription. - * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering. + * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / + * dead-lettering. */ - @JsonProperty(value = "destination") private EventSubscriptionDestination destination; /* * Information about the destination where events have to be delivered for the event subscription. - * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering. + * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication + * tokens being used during delivery / dead-lettering. */ - @JsonProperty(value = "deliveryWithResourceIdentity") private DeliveryWithResourceIdentity deliveryWithResourceIdentity; /* * Information about the filter for the event subscription. */ - @JsonProperty(value = "filter") private EventSubscriptionFilter filter; /* * List of user defined labels. */ - @JsonProperty(value = "labels") private List labels; /* * Expiration time of the event subscription. */ - @JsonProperty(value = "expirationTimeUtc") private OffsetDateTime expirationTimeUtc; /* * The event delivery schema for the event subscription. */ - @JsonProperty(value = "eventDeliverySchema") private EventDeliverySchema eventDeliverySchema; /* - * The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. + * The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live + * for events. */ - @JsonProperty(value = "retryPolicy") private RetryPolicy retryPolicy; /* - * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. - * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering. + * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is + * sent to the dead letter destination. + * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / + * dead-lettering. */ - @JsonProperty(value = "deadLetterDestination") private DeadLetterDestination deadLetterDestination; /* - * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. - * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering. + * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is + * sent to the dead letter destination. + * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication + * tokens being used during delivery / dead-lettering. */ - @JsonProperty(value = "deadLetterWithResourceIdentity") private DeadLetterWithResourceIdentity deadLetterWithResourceIdentity; /** @@ -349,4 +351,79 @@ public void validate() { deadLetterWithResourceIdentity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("destination", this.destination); + jsonWriter.writeJsonField("deliveryWithResourceIdentity", this.deliveryWithResourceIdentity); + jsonWriter.writeJsonField("filter", this.filter); + jsonWriter.writeArrayField("labels", this.labels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("expirationTimeUtc", + this.expirationTimeUtc == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationTimeUtc)); + jsonWriter.writeStringField("eventDeliverySchema", + this.eventDeliverySchema == null ? null : this.eventDeliverySchema.toString()); + jsonWriter.writeJsonField("retryPolicy", this.retryPolicy); + jsonWriter.writeJsonField("deadLetterDestination", this.deadLetterDestination); + jsonWriter.writeJsonField("deadLetterWithResourceIdentity", this.deadLetterWithResourceIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventSubscriptionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventSubscriptionProperties 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 EventSubscriptionProperties. + */ + public static EventSubscriptionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventSubscriptionProperties deserializedEventSubscriptionProperties = new EventSubscriptionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("topic".equals(fieldName)) { + deserializedEventSubscriptionProperties.topic = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedEventSubscriptionProperties.provisioningState + = EventSubscriptionProvisioningState.fromString(reader.getString()); + } else if ("destination".equals(fieldName)) { + deserializedEventSubscriptionProperties.destination = EventSubscriptionDestination.fromJson(reader); + } else if ("deliveryWithResourceIdentity".equals(fieldName)) { + deserializedEventSubscriptionProperties.deliveryWithResourceIdentity + = DeliveryWithResourceIdentity.fromJson(reader); + } else if ("filter".equals(fieldName)) { + deserializedEventSubscriptionProperties.filter = EventSubscriptionFilter.fromJson(reader); + } else if ("labels".equals(fieldName)) { + List labels = reader.readArray(reader1 -> reader1.getString()); + deserializedEventSubscriptionProperties.labels = labels; + } else if ("expirationTimeUtc".equals(fieldName)) { + deserializedEventSubscriptionProperties.expirationTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("eventDeliverySchema".equals(fieldName)) { + deserializedEventSubscriptionProperties.eventDeliverySchema + = EventDeliverySchema.fromString(reader.getString()); + } else if ("retryPolicy".equals(fieldName)) { + deserializedEventSubscriptionProperties.retryPolicy = RetryPolicy.fromJson(reader); + } else if ("deadLetterDestination".equals(fieldName)) { + deserializedEventSubscriptionProperties.deadLetterDestination + = DeadLetterDestination.fromJson(reader); + } else if ("deadLetterWithResourceIdentity".equals(fieldName)) { + deserializedEventSubscriptionProperties.deadLetterWithResourceIdentity + = DeadLetterWithResourceIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEventSubscriptionProperties; + }); + } } 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 c3ac57df7a055..33d6f77aad88a 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 @@ -6,7 +6,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Event Type for a subject under a topic. @@ -16,9 +19,23 @@ public final class EventTypeInner extends ProxyResource { /* * Properties of the event type. */ - @JsonProperty(value = "properties") private EventTypeProperties innerProperties; + /* + * 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 EventTypeInner class. */ @@ -34,6 +51,36 @@ private EventTypeProperties innerProperties() { return this.innerProperties; } + /** + * 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; + } + /** * Get the displayName property: Display name of the event type. * @@ -81,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. */ @@ -90,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. @@ -136,4 +183,47 @@ public void validate() { 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 EventTypeInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventTypeInner 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 EventTypeInner. + */ + public static EventTypeInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventTypeInner deserializedEventTypeInner = new EventTypeInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEventTypeInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEventTypeInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEventTypeInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedEventTypeInner.innerProperties = EventTypeProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEventTypeInner; + }); + } } 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 666a75ff76839..48ede06add4dc 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 @@ -5,35 +5,35 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 event type. */ @Fluent -public final class EventTypeProperties { +public final class EventTypeProperties implements JsonSerializable { /* * Display name of the event type. */ - @JsonProperty(value = "displayName") private String displayName; /* * Description of the event type. */ - @JsonProperty(value = "description") private String description; /* - * Url of the schema for this event type. + * URL of the schema for this event type. */ - @JsonProperty(value = "schemaUrl") private String schemaUrl; /* * IsInDefaultSet flag of the event type. */ - @JsonProperty(value = "isInDefaultSet") private Boolean isInDefaultSet; /** @@ -83,7 +83,7 @@ public EventTypeProperties 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. */ @@ -92,7 +92,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 EventTypeProperties object itself. @@ -129,4 +129,49 @@ public EventTypeProperties withIsInDefaultSet(Boolean isInDefaultSet) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("schemaUrl", this.schemaUrl); + jsonWriter.writeBooleanField("isInDefaultSet", this.isInDefaultSet); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventTypeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventTypeProperties 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 EventTypeProperties. + */ + public static EventTypeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventTypeProperties deserializedEventTypeProperties = new EventTypeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedEventTypeProperties.displayName = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedEventTypeProperties.description = reader.getString(); + } else if ("schemaUrl".equals(fieldName)) { + deserializedEventTypeProperties.schemaUrl = reader.getString(); + } else if ("isInDefaultSet".equals(fieldName)) { + deserializedEventTypeProperties.isInDefaultSet = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedEventTypeProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicInner.java index 11ac4cec9c740..5690311a12e8e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicInner.java @@ -7,7 +7,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Event grid Extension Topic. This is used for getting Event Grid related metrics for Azure resources. @@ -17,15 +20,28 @@ public final class ExtensionTopicInner extends ProxyResource { /* * Properties of the extension topic. */ - @JsonProperty(value = "properties") private ExtensionTopicProperties innerProperties; /* - * The system metadata relating to Extension Topic resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 ExtensionTopicInner class. */ @@ -42,7 +58,7 @@ private ExtensionTopicProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to Extension Topic resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -50,6 +66,36 @@ 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; + } + /** * Get the description property: Description of the extension topic. * @@ -106,4 +152,49 @@ public void validate() { 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 ExtensionTopicInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtensionTopicInner 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 ExtensionTopicInner. + */ + public static ExtensionTopicInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtensionTopicInner deserializedExtensionTopicInner = new ExtensionTopicInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExtensionTopicInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExtensionTopicInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExtensionTopicInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedExtensionTopicInner.innerProperties = ExtensionTopicProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedExtensionTopicInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExtensionTopicInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicProperties.java index 372bbbd93085f..890cda7e8199d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicProperties.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 Extension Topic. */ @Fluent -public final class ExtensionTopicProperties { +public final class ExtensionTopicProperties implements JsonSerializable { /* * Description of the extension topic. */ - @JsonProperty(value = "description") private String description; /* * System topic resource id which is mapped to the source. */ - @JsonProperty(value = "systemTopic") private String systemTopic; /** @@ -77,4 +79,43 @@ public ExtensionTopicProperties withSystemTopic(String systemTopic) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("systemTopic", this.systemTopic); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtensionTopicProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtensionTopicProperties 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 ExtensionTopicProperties. + */ + public static ExtensionTopicProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtensionTopicProperties deserializedExtensionTopicProperties = new ExtensionTopicProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedExtensionTopicProperties.description = reader.getString(); + } else if ("systemTopic".equals(fieldName)) { + deserializedExtensionTopicProperties.systemTopic = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExtensionTopicProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/HybridConnectionEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/HybridConnectionEventSubscriptionDestinationProperties.java index e80b19f88c630..da441166b4fd1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/HybridConnectionEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/HybridConnectionEventSubscriptionDestinationProperties.java @@ -5,25 +5,28 @@ 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.DeliveryAttributeMapping; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties for a hybrid connection destination. */ @Fluent -public final class HybridConnectionEventSubscriptionDestinationProperties { +public final class HybridConnectionEventSubscriptionDestinationProperties + implements JsonSerializable { /* * The Azure Resource ID of an hybrid connection that is the destination of an event subscription. */ - @JsonProperty(value = "resourceId") private String resourceId; /* * Delivery attribute details. */ - @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; /** @@ -85,4 +88,49 @@ public void validate() { deliveryAttributeMappings().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeArrayField("deliveryAttributeMappings", this.deliveryAttributeMappings, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HybridConnectionEventSubscriptionDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HybridConnectionEventSubscriptionDestinationProperties 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 HybridConnectionEventSubscriptionDestinationProperties. + */ + public static HybridConnectionEventSubscriptionDestinationProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + HybridConnectionEventSubscriptionDestinationProperties deserializedHybridConnectionEventSubscriptionDestinationProperties + = new HybridConnectionEventSubscriptionDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedHybridConnectionEventSubscriptionDestinationProperties.resourceId = reader.getString(); + } else if ("deliveryAttributeMappings".equals(fieldName)) { + List deliveryAttributeMappings + = reader.readArray(reader1 -> DeliveryAttributeMapping.fromJson(reader1)); + deserializedHybridConnectionEventSubscriptionDestinationProperties.deliveryAttributeMappings + = deliveryAttributeMappings; + } else { + reader.skipChildren(); + } + } + + return deserializedHybridConnectionEventSubscriptionDestinationProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/JsonInputSchemaMappingProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/JsonInputSchemaMappingProperties.java index 1ca6ea1d1b01c..4713e909cbe68 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/JsonInputSchemaMappingProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/JsonInputSchemaMappingProperties.java @@ -5,50 +5,48 @@ 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.JsonField; import com.azure.resourcemanager.eventgrid.models.JsonFieldWithDefault; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * This can be used to map properties of a source schema (or default values, for certain supported properties) to * properties of the EventGridEvent schema. */ @Fluent -public final class JsonInputSchemaMappingProperties { +public final class JsonInputSchemaMappingProperties implements JsonSerializable { /* * The mapping information for the Id property of the Event Grid Event. */ - @JsonProperty(value = "id") private JsonField id; /* * The mapping information for the Topic property of the Event Grid Event. */ - @JsonProperty(value = "topic") private JsonField topic; /* * The mapping information for the EventTime property of the Event Grid Event. */ - @JsonProperty(value = "eventTime") private JsonField eventTime; /* * The mapping information for the EventType property of the Event Grid Event. */ - @JsonProperty(value = "eventType") private JsonFieldWithDefault eventType; /* * The mapping information for the Subject property of the Event Grid Event. */ - @JsonProperty(value = "subject") private JsonFieldWithDefault subject; /* * The mapping information for the DataVersion property of the Event Grid Event. */ - @JsonProperty(value = "dataVersion") private JsonFieldWithDefault dataVersion; /** @@ -202,4 +200,56 @@ public void validate() { dataVersion().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("id", this.id); + jsonWriter.writeJsonField("topic", this.topic); + jsonWriter.writeJsonField("eventTime", this.eventTime); + jsonWriter.writeJsonField("eventType", this.eventType); + jsonWriter.writeJsonField("subject", this.subject); + jsonWriter.writeJsonField("dataVersion", this.dataVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JsonInputSchemaMappingProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JsonInputSchemaMappingProperties 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 JsonInputSchemaMappingProperties. + */ + public static JsonInputSchemaMappingProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JsonInputSchemaMappingProperties deserializedJsonInputSchemaMappingProperties + = new JsonInputSchemaMappingProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedJsonInputSchemaMappingProperties.id = JsonField.fromJson(reader); + } else if ("topic".equals(fieldName)) { + deserializedJsonInputSchemaMappingProperties.topic = JsonField.fromJson(reader); + } else if ("eventTime".equals(fieldName)) { + deserializedJsonInputSchemaMappingProperties.eventTime = JsonField.fromJson(reader); + } else if ("eventType".equals(fieldName)) { + deserializedJsonInputSchemaMappingProperties.eventType = JsonFieldWithDefault.fromJson(reader); + } else if ("subject".equals(fieldName)) { + deserializedJsonInputSchemaMappingProperties.subject = JsonFieldWithDefault.fromJson(reader); + } else if ("dataVersion".equals(fieldName)) { + deserializedJsonInputSchemaMappingProperties.dataVersion = JsonFieldWithDefault.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJsonInputSchemaMappingProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/MonitorAlertEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/MonitorAlertEventSubscriptionDestinationProperties.java index cd97a7da21b10..60d6e771a7aef 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/MonitorAlertEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/MonitorAlertEventSubscriptionDestinationProperties.java @@ -5,33 +5,37 @@ 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.MonitorAlertSeverity; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties that represent the Monitor Alert destination of an event subscription. */ @Fluent -public final class MonitorAlertEventSubscriptionDestinationProperties { +public final class MonitorAlertEventSubscriptionDestinationProperties + implements JsonSerializable { /* * The severity that will be attached to every Alert fired through this event subscription. * This field must be provided. */ - @JsonProperty(value = "severity") private MonitorAlertSeverity severity; /* * The description that will be attached to every Alert fired through this event subscription. */ - @JsonProperty(value = "description") private String description; /* * The list of ARM Ids of Action Groups that will be triggered on every Alert fired through this event subscription. - * Each resource ARM Id should follow this pattern: /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Insights/actionGroups/{ActionGroupName}. + * Each resource ARM Id should follow this pattern: + * /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Insights/actionGroups + * /{ActionGroupName}. */ - @JsonProperty(value = "actionGroups") private List actionGroups; /** @@ -119,4 +123,50 @@ public MonitorAlertEventSubscriptionDestinationProperties withActionGroups(List< */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("severity", this.severity == null ? null : this.severity.toString()); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeArrayField("actionGroups", this.actionGroups, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitorAlertEventSubscriptionDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitorAlertEventSubscriptionDestinationProperties 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 MonitorAlertEventSubscriptionDestinationProperties. + */ + public static MonitorAlertEventSubscriptionDestinationProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + MonitorAlertEventSubscriptionDestinationProperties deserializedMonitorAlertEventSubscriptionDestinationProperties + = new MonitorAlertEventSubscriptionDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("severity".equals(fieldName)) { + deserializedMonitorAlertEventSubscriptionDestinationProperties.severity + = MonitorAlertSeverity.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedMonitorAlertEventSubscriptionDestinationProperties.description = reader.getString(); + } else if ("actionGroups".equals(fieldName)) { + List actionGroups = reader.readArray(reader1 -> reader1.getString()); + deserializedMonitorAlertEventSubscriptionDestinationProperties.actionGroups = actionGroups; + } else { + reader.skipChildren(); + } + } + + return deserializedMonitorAlertEventSubscriptionDestinationProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceInner.java index 457bf63e9721e..f5d936405af99 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceInner.java @@ -7,15 +7,18 @@ 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.IdentityInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.NamespaceProvisioningState; import com.azure.resourcemanager.eventgrid.models.NamespaceSku; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -27,27 +30,38 @@ public final class NamespaceInner extends Resource { /* * Properties of the Namespace resource. */ - @JsonProperty(value = "properties") private NamespaceProperties innerProperties; /* * Represents available Sku pricing tiers. */ - @JsonProperty(value = "sku") private NamespaceSku sku; /* * Identity information for the Namespace resource. */ - @JsonProperty(value = "identity") private IdentityInfo identity; /* - * The system metadata relating to the namespace resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 NamespaceInner class. */ @@ -104,7 +118,7 @@ public NamespaceInner withIdentity(IdentityInfo identity) { } /** - * Get the systemData property: The system metadata relating to the namespace resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -112,6 +126,36 @@ 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} */ @@ -339,4 +383,62 @@ public void validate() { identity().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); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NamespaceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceInner 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 NamespaceInner. + */ + public static NamespaceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceInner deserializedNamespaceInner = new NamespaceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNamespaceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNamespaceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNamespaceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedNamespaceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNamespaceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedNamespaceInner.innerProperties = NamespaceProperties.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedNamespaceInner.sku = NamespaceSku.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNamespaceInner.identity = IdentityInfo.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNamespaceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceProperties.java index fced657a4571e..c10d12647a558 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceProperties.java @@ -5,71 +5,70 @@ 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.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.NamespaceProvisioningState; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; +import java.io.IOException; import java.util.List; /** * Properties of the namespace resource. */ @Fluent -public final class NamespaceProperties { +public final class NamespaceProperties implements JsonSerializable { /* * List of private endpoint connections. */ - @JsonProperty(value = "privateEndpointConnections") private List privateEndpointConnections; /* * Provisioning state of the namespace resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private NamespaceProvisioningState provisioningState; /* * Topics configuration information for the namespace resource */ - @JsonProperty(value = "topicsConfiguration") private TopicsConfiguration topicsConfiguration; /* * Topic spaces configuration information for the namespace resource */ - @JsonProperty(value = "topicSpacesConfiguration") private TopicSpacesConfiguration topicSpacesConfiguration; /* - * This is an optional property and it allows the user to specify if the namespace resource supports zone-redundancy capability or not. If this + * This is an optional property and it allows the user to specify if the namespace resource supports zone-redundancy + * capability or not. If this * property is not specified explicitly by the user, its default value depends on the following conditions: - * a. For Availability Zones enabled regions - The default property value would be true. - * b. For non-Availability Zones enabled regions - The default property value would be false. + * a. For Availability Zones enabled regions - The default property value would be true. + * b. For non-Availability Zones enabled regions - The default property value would be false. * Once specified, this property cannot be updated. */ - @JsonProperty(value = "isZoneRedundant") private Boolean isZoneRedundant; /* * This determines if traffic is allowed over public network. By default it is enabled. - * You can further restrict to specific IPs by configuring + * You can further restrict to specific IPs by configuring */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ - @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* * Minimum TLS version of the publisher allowed to publish to this namespace. Only TLS version 1.2 is supported. */ - @JsonProperty(value = "minimumTlsVersionAllowed") private TlsVersion minimumTlsVersionAllowed; /** @@ -269,4 +268,71 @@ public void validate() { inboundIpRules().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("privateEndpointConnections", this.privateEndpointConnections, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("topicsConfiguration", this.topicsConfiguration); + jsonWriter.writeJsonField("topicSpacesConfiguration", this.topicSpacesConfiguration); + jsonWriter.writeBooleanField("isZoneRedundant", this.isZoneRedundant); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeArrayField("inboundIpRules", this.inboundIpRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("minimumTlsVersionAllowed", + this.minimumTlsVersionAllowed == null ? null : this.minimumTlsVersionAllowed.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NamespaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceProperties 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 NamespaceProperties. + */ + public static NamespaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceProperties deserializedNamespaceProperties = new NamespaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedNamespaceProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("provisioningState".equals(fieldName)) { + deserializedNamespaceProperties.provisioningState + = NamespaceProvisioningState.fromString(reader.getString()); + } else if ("topicsConfiguration".equals(fieldName)) { + deserializedNamespaceProperties.topicsConfiguration = TopicsConfiguration.fromJson(reader); + } else if ("topicSpacesConfiguration".equals(fieldName)) { + deserializedNamespaceProperties.topicSpacesConfiguration + = TopicSpacesConfiguration.fromJson(reader); + } else if ("isZoneRedundant".equals(fieldName)) { + deserializedNamespaceProperties.isZoneRedundant = reader.getNullable(JsonReader::getBoolean); + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedNamespaceProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("inboundIpRules".equals(fieldName)) { + List inboundIpRules = reader.readArray(reader1 -> InboundIpRule.fromJson(reader1)); + deserializedNamespaceProperties.inboundIpRules = inboundIpRules; + } else if ("minimumTlsVersionAllowed".equals(fieldName)) { + deserializedNamespaceProperties.minimumTlsVersionAllowed + = TlsVersion.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceSharedAccessKeysInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceSharedAccessKeysInner.java index aabc344a92286..b2ebff88181cd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceSharedAccessKeysInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceSharedAccessKeysInner.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Shared access keys of the Namespace. */ @Fluent -public final class NamespaceSharedAccessKeysInner { +public final class NamespaceSharedAccessKeysInner implements JsonSerializable { /* * Shared access key1 for the namespace. */ - @JsonProperty(value = "key1") private String key1; /* * Shared access key2 for the namespace. */ - @JsonProperty(value = "key2") private String key2; /** @@ -77,4 +79,44 @@ public NamespaceSharedAccessKeysInner withKey2(String key2) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key1", this.key1); + jsonWriter.writeStringField("key2", this.key2); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NamespaceSharedAccessKeysInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceSharedAccessKeysInner 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 NamespaceSharedAccessKeysInner. + */ + public static NamespaceSharedAccessKeysInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceSharedAccessKeysInner deserializedNamespaceSharedAccessKeysInner + = new NamespaceSharedAccessKeysInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key1".equals(fieldName)) { + deserializedNamespaceSharedAccessKeysInner.key1 = reader.getString(); + } else if ("key2".equals(fieldName)) { + deserializedNamespaceSharedAccessKeysInner.key2 = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceSharedAccessKeysInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicEventSubscriptionDestinationProperties.java index 51100485aeb86..9539d261243d3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicEventSubscriptionDestinationProperties.java @@ -5,19 +5,26 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 properties that represent the Event Grid Namespace Topic destination of an event subscription. */ @Fluent -public final class NamespaceTopicEventSubscriptionDestinationProperties { +public final class NamespaceTopicEventSubscriptionDestinationProperties + implements JsonSerializable { /* - * The Azure resource Id that represents the endpoint of the Event Grid Namespace Topic destination of an event subscription. + * The Azure resource Id that represents the endpoint of the Event Grid Namespace Topic destination of an event + * subscription. * This field is required and the Namespace Topic resource listed must already exist. - * The resource ARM Id should follow this pattern: /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.EventGrid/namespaces/{NamespaceName}/topics/{TopicName}. + * The resource ARM Id should follow this pattern: + * /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.EventGrid/namespaces/ + * {NamespaceName}/topics/{TopicName}. */ - @JsonProperty(value = "resourceId") private String resourceId; /** @@ -61,4 +68,42 @@ public NamespaceTopicEventSubscriptionDestinationProperties withResourceId(Strin */ 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 NamespaceTopicEventSubscriptionDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceTopicEventSubscriptionDestinationProperties 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 NamespaceTopicEventSubscriptionDestinationProperties. + */ + public static NamespaceTopicEventSubscriptionDestinationProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + NamespaceTopicEventSubscriptionDestinationProperties deserializedNamespaceTopicEventSubscriptionDestinationProperties + = new NamespaceTopicEventSubscriptionDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedNamespaceTopicEventSubscriptionDestinationProperties.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceTopicEventSubscriptionDestinationProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicInner.java index d551216d60c81..f710ec4db2502 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicInner.java @@ -7,10 +7,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.EventInputSchema; import com.azure.resourcemanager.eventgrid.models.NamespaceTopicProvisioningState; import com.azure.resourcemanager.eventgrid.models.PublisherType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Namespace topic details. @@ -20,15 +23,28 @@ public final class NamespaceTopicInner extends ProxyResource { /* * Properties of the namespace topic. */ - @JsonProperty(value = "properties") private NamespaceTopicProperties innerProperties; /* - * The system metadata relating to namespace topic resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 NamespaceTopicInner class. */ @@ -45,7 +61,7 @@ private NamespaceTopicProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to namespace topic resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -53,6 +69,36 @@ 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; + } + /** * Get the provisioningState property: Provisioning state of the namespace topic. * @@ -147,4 +193,49 @@ public void validate() { 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 NamespaceTopicInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceTopicInner 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 NamespaceTopicInner. + */ + public static NamespaceTopicInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceTopicInner deserializedNamespaceTopicInner = new NamespaceTopicInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNamespaceTopicInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNamespaceTopicInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNamespaceTopicInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedNamespaceTopicInner.innerProperties = NamespaceTopicProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNamespaceTopicInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceTopicInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicProperties.java index a65419ad3d8e8..a97887bd9599f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicProperties.java @@ -5,39 +5,39 @@ 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.EventInputSchema; import com.azure.resourcemanager.eventgrid.models.NamespaceTopicProvisioningState; import com.azure.resourcemanager.eventgrid.models.PublisherType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Properties of the namespace topic. */ @Fluent -public final class NamespaceTopicProperties { +public final class NamespaceTopicProperties implements JsonSerializable { /* * Provisioning state of the namespace topic. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private NamespaceTopicProvisioningState provisioningState; /* * Publisher type of the namespace topic. */ - @JsonProperty(value = "publisherType") private PublisherType publisherType; /* * This determines the format that is expected for incoming events published to the topic. */ - @JsonProperty(value = "inputSchema") private EventInputSchema inputSchema; /* * Event retention for the namespace topic expressed in days. The property default value is 1 day. * Min event retention duration value is 1 day and max event retention duration value is 1 day. */ - @JsonProperty(value = "eventRetentionInDays") private Integer eventRetentionInDays; /** @@ -128,4 +128,49 @@ public NamespaceTopicProperties withEventRetentionInDays(Integer eventRetentionI */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publisherType", this.publisherType == null ? null : this.publisherType.toString()); + jsonWriter.writeStringField("inputSchema", this.inputSchema == null ? null : this.inputSchema.toString()); + jsonWriter.writeNumberField("eventRetentionInDays", this.eventRetentionInDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NamespaceTopicProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceTopicProperties 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 NamespaceTopicProperties. + */ + public static NamespaceTopicProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceTopicProperties deserializedNamespaceTopicProperties = new NamespaceTopicProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedNamespaceTopicProperties.provisioningState + = NamespaceTopicProvisioningState.fromString(reader.getString()); + } else if ("publisherType".equals(fieldName)) { + deserializedNamespaceTopicProperties.publisherType = PublisherType.fromString(reader.getString()); + } else if ("inputSchema".equals(fieldName)) { + deserializedNamespaceTopicProperties.inputSchema = EventInputSchema.fromString(reader.getString()); + } else if ("eventRetentionInDays".equals(fieldName)) { + deserializedNamespaceTopicProperties.eventRetentionInDays = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceTopicProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicUpdateParameterProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicUpdateParameterProperties.java index 7846a9a63b925..e7d7e3f0d4257 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicUpdateParameterProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicUpdateParameterProperties.java @@ -5,18 +5,22 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 of namespace topic update parameter properties. */ @Fluent -public final class NamespaceTopicUpdateParameterProperties { +public final class NamespaceTopicUpdateParameterProperties + implements JsonSerializable { /* * Event retention for the namespace topic expressed in days. The property default value is 1 day. * Min event retention duration value is 1 day and max event retention duration value is 1 day. */ - @JsonProperty(value = "eventRetentionInDays") private Integer eventRetentionInDays; /** @@ -56,4 +60,42 @@ public NamespaceTopicUpdateParameterProperties withEventRetentionInDays(Integer */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("eventRetentionInDays", this.eventRetentionInDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NamespaceTopicUpdateParameterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceTopicUpdateParameterProperties 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 NamespaceTopicUpdateParameterProperties. + */ + public static NamespaceTopicUpdateParameterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceTopicUpdateParameterProperties deserializedNamespaceTopicUpdateParameterProperties + = new NamespaceTopicUpdateParameterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("eventRetentionInDays".equals(fieldName)) { + deserializedNamespaceTopicUpdateParameterProperties.eventRetentionInDays + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceTopicUpdateParameterProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceUpdateParameterProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceUpdateParameterProperties.java index 8b16ef3dc55ca..fc66f6b2893db 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceUpdateParameterProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceUpdateParameterProperties.java @@ -5,41 +5,44 @@ 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.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.UpdateTopicsConfigurationInfo; import com.azure.resourcemanager.eventgrid.models.UpdateTopicSpacesConfigurationInfo; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.resourcemanager.eventgrid.models.UpdateTopicsConfigurationInfo; +import java.io.IOException; import java.util.List; /** * Information of namespace update parameter properties. */ @Fluent -public final class NamespaceUpdateParameterProperties { +public final class NamespaceUpdateParameterProperties implements JsonSerializable { /* * Topic spaces configuration properties that can be updated. */ - @JsonProperty(value = "topicSpacesConfiguration") private UpdateTopicSpacesConfigurationInfo topicSpacesConfiguration; /* * Topics configuration properties that can be updated. */ - @JsonProperty(value = "topicsConfiguration") private UpdateTopicsConfigurationInfo topicsConfiguration; /* - * This determines if traffic is allowed over public network. By default it is enabled. - * You can further restrict to specific IPs by configuring + * This determines if traffic is allowed over public network. By default it is enabled. + * You can further restrict to specific IPs by configuring */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ - @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /** @@ -156,4 +159,56 @@ public void validate() { inboundIpRules().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("topicSpacesConfiguration", this.topicSpacesConfiguration); + jsonWriter.writeJsonField("topicsConfiguration", this.topicsConfiguration); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeArrayField("inboundIpRules", this.inboundIpRules, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NamespaceUpdateParameterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceUpdateParameterProperties 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 NamespaceUpdateParameterProperties. + */ + public static NamespaceUpdateParameterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceUpdateParameterProperties deserializedNamespaceUpdateParameterProperties + = new NamespaceUpdateParameterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("topicSpacesConfiguration".equals(fieldName)) { + deserializedNamespaceUpdateParameterProperties.topicSpacesConfiguration + = UpdateTopicSpacesConfigurationInfo.fromJson(reader); + } else if ("topicsConfiguration".equals(fieldName)) { + deserializedNamespaceUpdateParameterProperties.topicsConfiguration + = UpdateTopicsConfigurationInfo.fromJson(reader); + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedNamespaceUpdateParameterProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("inboundIpRules".equals(fieldName)) { + List inboundIpRules = reader.readArray(reader1 -> InboundIpRule.fromJson(reader1)); + deserializedNamespaceUpdateParameterProperties.inboundIpRules = inboundIpRules; + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceUpdateParameterProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationInner.java index 3ba3234d1177f..5a2aeabea5c68 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationInner.java @@ -6,12 +6,15 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +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 com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -22,9 +25,23 @@ public final class NetworkSecurityPerimeterConfigurationInner extends ProxyResou /* * Properties of the network security perimeter configuration. */ - @JsonProperty(value = "properties") private NetworkSecurityPerimeterConfigurationProperties innerProperties; + /* + * 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 NetworkSecurityPerimeterConfigurationInner class. */ @@ -40,6 +57,36 @@ private NetworkSecurityPerimeterConfigurationProperties innerProperties() { return this.innerProperties; } + /** + * 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; + } + /** * Get the provisioningState property: Provisioning state to reflect configuration state and indicate status of nsp * profile configuration retrieval. @@ -173,4 +220,49 @@ public void validate() { 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 index 5351b6ed403bb..21c95de41d805 100644 --- 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 @@ -5,44 +5,44 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Network security perimeter configuration issues properties. */ @Fluent -public final class NetworkSecurityPerimeterConfigurationIssuesProperties { +public final class NetworkSecurityPerimeterConfigurationIssuesProperties + implements JsonSerializable { /* * Provisioning issue type. */ - @JsonProperty(value = "issueType") private NetworkSecurityPerimeterConfigurationIssueType issueType; /* * Provisioning issue severity. */ - @JsonProperty(value = "severity") private NetworkSecurityPerimeterConfigurationIssueSeverity severity; /* * Provisioning issue description. */ - @JsonProperty(value = "description") private String description; /* * ARM IDs of resources that can be associated to the same perimeter to remediate the issue. */ - @JsonProperty(value = "suggestedResourceIds") private List suggestedResourceIds; /* * Access rules that can be added to the same profile to remediate the issue. */ - @JsonProperty(value = "suggestedAccessRules") private List suggestedAccessRules; /** @@ -164,4 +164,62 @@ public List suggestedAccessRules() { */ 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 index f6cc7de40a841..13357d6ae0558 100644 --- 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 @@ -5,47 +5,47 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class NetworkSecurityPerimeterConfigurationProperties + implements JsonSerializable { /* * Provisioning state to reflect configuration state and indicate status of nsp profile configuration retrieval. */ - @JsonProperty(value = "provisioningState") private NetworkSecurityPerimeterConfigProvisioningState provisioningState; /* * Provisioning issues to reflect status when attempting to retrieve nsp profile configuration. */ - @JsonProperty(value = "provisioningIssues") private List provisioningIssues; /* * Perimeter info for nsp association. */ - @JsonProperty(value = "networkSecurityPerimeter") private NetworkSecurityPerimeterInfo networkSecurityPerimeter; /* * Nsp association name and access mode of association. */ - @JsonProperty(value = "resourceAssociation") private ResourceAssociation resourceAssociation; /* * Nsp profile configuration, access rules and diagnostic settings. */ - @JsonProperty(value = "profile") private NetworkSecurityPerimeterConfigurationProfile profile; /** @@ -182,4 +182,61 @@ public void validate() { 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 index 7b4d993c206dc..e2749f03cfbf5 100644 --- 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 @@ -5,57 +5,55 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Network security perimeter profile access rule properties. */ @Fluent -public final class NetworkSecurityPerimeterProfileAccessRuleProperties { +public final class NetworkSecurityPerimeterProfileAccessRuleProperties + implements JsonSerializable { /* * NSP access rule direction. */ - @JsonProperty(value = "direction") private NetworkSecurityPerimeterProfileAccessRuleDirection direction; /* * Address prefixes. */ - @JsonProperty(value = "addressPrefixes") private List addressPrefixes; /* * List of subscriptions. */ - @JsonProperty(value = "subscriptions") private List subscriptions; /* * Network security perimeters. */ - @JsonProperty(value = "networkSecurityPerimeters") private List networkSecurityPerimeters; /* * Fully qualified domain names. */ - @JsonProperty(value = "fullyQualifiedDomainNames") private List fullyQualifiedDomainNames; /* * List of email addresses. */ - @JsonProperty(value = "emailAddresses") private List emailAddresses; /* * List of phone numbers. */ - @JsonProperty(value = "phoneNumbers") private List phoneNumbers; /** @@ -221,4 +219,75 @@ public void validate() { 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/OperationInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/OperationInner.java index a5ff7b21a7f42..9ddf79f19db9d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/OperationInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/OperationInner.java @@ -5,42 +5,41 @@ 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.OperationInfo; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Represents an operation returned by the GetOperations request. */ @Fluent -public final class OperationInner { +public final class OperationInner implements JsonSerializable { /* * Name of the operation. */ - @JsonProperty(value = "name") private String name; /* * Display name of the operation. */ - @JsonProperty(value = "display") private OperationInfo display; /* * Origin of the operation. */ - @JsonProperty(value = "origin") private String origin; /* * This Boolean is used to determine if the operation is a data plane action or not. */ - @JsonProperty(value = "isDataAction") private Boolean isDataAction; /* * Properties of the operation. */ - @JsonProperty(value = "properties") private Object properties; /** @@ -159,4 +158,52 @@ public void validate() { display().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("display", this.display); + jsonWriter.writeStringField("origin", this.origin); + jsonWriter.writeBooleanField("isDataAction", this.isDataAction); + jsonWriter.writeUntypedField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationInner 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 OperationInner. + */ + public static OperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationInner deserializedOperationInner = new OperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationInner.name = reader.getString(); + } else if ("display".equals(fieldName)) { + deserializedOperationInner.display = OperationInfo.fromJson(reader); + } else if ("origin".equals(fieldName)) { + deserializedOperationInner.origin = reader.getString(); + } else if ("isDataAction".equals(fieldName)) { + deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); + } else if ("properties".equals(fieldName)) { + deserializedOperationInner.properties = reader.readUntyped(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationInner; + }); + } } 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 ce800c723473c..c0863cdfebccb 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 @@ -7,10 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.PartnerAuthorization; import com.azure.resourcemanager.eventgrid.models.PartnerConfigurationProvisioningState; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -21,28 +23,38 @@ public final class PartnerConfigurationInner extends ProxyResource { /* * Properties of the partner configuration. */ - @JsonProperty(value = "properties") private PartnerConfigurationProperties innerProperties; /* - * The system metadata relating to partner configuration resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Location of the resource. */ - @JsonProperty(value = "location") private String location; /* * Tags of the resource. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /* + * 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 PartnerConfigurationInner class. */ @@ -59,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. */ @@ -107,6 +119,36 @@ public PartnerConfigurationInner withTags(Map tags) { return this; } + /** + * 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; + } + /** * Get the partnerAuthorization property: The details of authorized partners. * @@ -163,4 +205,57 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerConfigurationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerConfigurationInner 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 PartnerConfigurationInner. + */ + public static PartnerConfigurationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerConfigurationInner deserializedPartnerConfigurationInner = new PartnerConfigurationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPartnerConfigurationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPartnerConfigurationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPartnerConfigurationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPartnerConfigurationInner.innerProperties + = PartnerConfigurationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPartnerConfigurationInner.systemData = SystemData.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedPartnerConfigurationInner.location = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPartnerConfigurationInner.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerConfigurationInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationProperties.java index efc57e92d66a7..a76e9dc74a545 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationProperties.java @@ -5,25 +5,27 @@ 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.PartnerAuthorization; import com.azure.resourcemanager.eventgrid.models.PartnerConfigurationProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Properties of the partner configuration. */ @Fluent -public final class PartnerConfigurationProperties { +public final class PartnerConfigurationProperties implements JsonSerializable { /* * The details of authorized partners. */ - @JsonProperty(value = "partnerAuthorization") private PartnerAuthorization partnerAuthorization; /* * Provisioning state of the partner configuration. */ - @JsonProperty(value = "provisioningState") private PartnerConfigurationProvisioningState provisioningState; /** @@ -83,4 +85,47 @@ public void validate() { partnerAuthorization().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("partnerAuthorization", this.partnerAuthorization); + jsonWriter.writeStringField("provisioningState", + this.provisioningState == null ? null : this.provisioningState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerConfigurationProperties 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 PartnerConfigurationProperties. + */ + public static PartnerConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerConfigurationProperties deserializedPartnerConfigurationProperties + = new PartnerConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("partnerAuthorization".equals(fieldName)) { + deserializedPartnerConfigurationProperties.partnerAuthorization + = PartnerAuthorization.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPartnerConfigurationProperties.provisioningState + = PartnerConfigurationProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerConfigurationProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationUpdateParameterProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationUpdateParameterProperties.java index 31245b2a602da..553ab5cf409be 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationUpdateParameterProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationUpdateParameterProperties.java @@ -5,17 +5,22 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 of partner configuration update parameter properties. */ @Fluent -public final class PartnerConfigurationUpdateParameterProperties { +public final class PartnerConfigurationUpdateParameterProperties + implements JsonSerializable { /* - * The default time used to validate the maximum expiration time for each authorized partners in days. Allowed values ar between 1 and 365 days. + * The default time used to validate the maximum expiration time for each authorized partners in days. Allowed + * values ar between 1 and 365 days. */ - @JsonProperty(value = "defaultMaximumExpirationTimeInDays") private Integer defaultMaximumExpirationTimeInDays; /** @@ -54,4 +59,42 @@ public Integer defaultMaximumExpirationTimeInDays() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("defaultMaximumExpirationTimeInDays", this.defaultMaximumExpirationTimeInDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerConfigurationUpdateParameterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerConfigurationUpdateParameterProperties 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 PartnerConfigurationUpdateParameterProperties. + */ + public static PartnerConfigurationUpdateParameterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerConfigurationUpdateParameterProperties deserializedPartnerConfigurationUpdateParameterProperties + = new PartnerConfigurationUpdateParameterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("defaultMaximumExpirationTimeInDays".equals(fieldName)) { + deserializedPartnerConfigurationUpdateParameterProperties.defaultMaximumExpirationTimeInDays + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerConfigurationUpdateParameterProperties; + }); + } } 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 index 18ed44dbb679d..ad6576d794973 100644 --- 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 @@ -7,9 +7,12 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; import java.util.UUID; @@ -22,15 +25,28 @@ public final class PartnerDestinationInner extends Resource { /* * Properties of the Partner Destination. */ - @JsonProperty(value = "properties") private PartnerDestinationProperties innerProperties; /* - * The system metadata relating to Partner Destination resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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. */ @@ -47,7 +63,7 @@ private PartnerDestinationProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to Partner Destination resource. + * Get the systemData property: The system metadata relating to the Event Grid resource. * * @return the systemData value. */ @@ -55,6 +71,36 @@ 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} */ @@ -234,4 +280,56 @@ public void validate() { 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 index 3d5ffcddc3dcf..e23129ce7ca83 100644 --- 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 @@ -5,58 +5,59 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class PartnerDestinationProperties implements JsonSerializable { /* * The immutable Id of the corresponding partner registration. */ - @JsonProperty(value = "partnerRegistrationImmutableId") private UUID partnerRegistrationImmutableId; /* * Endpoint context associated with this partner destination. */ - @JsonProperty(value = "endpointServiceContext") private String endpointServiceContext; /* - * Expiration time of the partner destination. If this timer expires and the partner destination was never activated, + * Expiration time of the partner destination. If this timer expires and the partner destination was never + * activated, * the partner destination and corresponding channel are deleted. */ - @JsonProperty(value = "expirationTimeIfNotActivatedUtc") private OffsetDateTime expirationTimeIfNotActivatedUtc; /* * Provisioning state of the partner destination. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PartnerDestinationProvisioningState provisioningState; /* * Activation state of the partner destination. */ - @JsonProperty(value = "activationState") private PartnerDestinationActivationState activationState; /* * Endpoint Base URL of the partner destination */ - @JsonProperty(value = "endpointBaseUrl") private String endpointBaseUrl; /* * Context or helpful message that can be used during the approval process. */ - @JsonProperty(value = "messageForActivation") private String messageForActivation; /** @@ -206,4 +207,66 @@ public PartnerDestinationProperties withMessageForActivation(String messageForAc */ 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 index ea15a201cf7e6..2c5a9e1f01d7a 100644 --- 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 @@ -5,17 +5,21 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class PartnerEventSubscriptionDestinationProperties + implements JsonSerializable { /* * The Azure Resource Id that represents the endpoint of a Partner Destination of an event subscription. */ - @JsonProperty(value = "resourceId") private String resourceId; /** @@ -53,4 +57,41 @@ public PartnerEventSubscriptionDestinationProperties withResourceId(String resou */ 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 83053fe5c7981..39fdd1c869ed9 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 @@ -7,12 +7,15 @@ 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.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceProvisioningState; import com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -24,15 +27,28 @@ public final class PartnerNamespaceInner extends Resource { /* * Properties of the Partner Namespace. */ - @JsonProperty(value = "properties") private PartnerNamespaceProperties innerProperties; /* - * The system metadata relating to Partner Namespace resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 PartnerNamespaceInner class. */ @@ -49,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. */ @@ -57,6 +73,36 @@ 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} */ @@ -276,4 +322,56 @@ public void validate() { 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 PartnerNamespaceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerNamespaceInner 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 PartnerNamespaceInner. + */ + public static PartnerNamespaceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerNamespaceInner deserializedPartnerNamespaceInner = new PartnerNamespaceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPartnerNamespaceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPartnerNamespaceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPartnerNamespaceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPartnerNamespaceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPartnerNamespaceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedPartnerNamespaceInner.innerProperties = PartnerNamespaceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPartnerNamespaceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerNamespaceInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceProperties.java index 9e49604044f92..b4078826a19e5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceProperties.java @@ -5,74 +5,76 @@ 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.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceProvisioningState; import com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Properties of the partner namespace. */ @Fluent -public final class PartnerNamespaceProperties { +public final class PartnerNamespaceProperties implements JsonSerializable { /* * List of private endpoint connections. */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; /* * Provisioning state of the partner namespace. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PartnerNamespaceProvisioningState provisioningState; /* - * The fully qualified ARM Id of the partner registration that should be associated with this partner namespace. This takes the following format: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}. + * The fully qualified ARM Id of the partner registration that should be associated with this partner namespace. + * This takes the following format: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/ + * partnerRegistrations/{partnerRegistrationName}. */ - @JsonProperty(value = "partnerRegistrationFullyQualifiedId") private String partnerRegistrationFullyQualifiedId; /* * Minimum TLS version of the publisher allowed to publish to this partner namespace */ - @JsonProperty(value = "minimumTlsVersionAllowed") private TlsVersion minimumTlsVersionAllowed; /* * Endpoint for the partner namespace. */ - @JsonProperty(value = "endpoint", access = JsonProperty.Access.WRITE_ONLY) private String endpoint; /* * This determines if traffic is allowed over public network. By default it is enabled. - * You can further restrict to specific IPs by configuring + * You can further restrict to specific IPs by configuring */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ - @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* - * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the partner namespace. + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the partner namespace. */ - @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; /* - * This determines if events published to this partner namespace should use the source attribute in the event payload - * or use the channel name in the header when matching to the partner topic. If none is specified, source attribute routing will be used to match the partner topic. + * This determines if events published to this partner namespace should use the source attribute in the event + * payload + * or use the channel name in the header when matching to the partner topic. If none is specified, source attribute + * routing will be used to match the partner topic. */ - @JsonProperty(value = "partnerTopicRoutingMode") private PartnerTopicRoutingMode partnerTopicRoutingMode; /** @@ -268,4 +270,73 @@ public void validate() { inboundIpRules().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("partnerRegistrationFullyQualifiedId", this.partnerRegistrationFullyQualifiedId); + jsonWriter.writeStringField("minimumTlsVersionAllowed", + this.minimumTlsVersionAllowed == null ? null : this.minimumTlsVersionAllowed.toString()); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeArrayField("inboundIpRules", this.inboundIpRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth); + jsonWriter.writeStringField("partnerTopicRoutingMode", + this.partnerTopicRoutingMode == null ? null : this.partnerTopicRoutingMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerNamespaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerNamespaceProperties 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 PartnerNamespaceProperties. + */ + public static PartnerNamespaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerNamespaceProperties deserializedPartnerNamespaceProperties = new PartnerNamespaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedPartnerNamespaceProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("provisioningState".equals(fieldName)) { + deserializedPartnerNamespaceProperties.provisioningState + = PartnerNamespaceProvisioningState.fromString(reader.getString()); + } else if ("partnerRegistrationFullyQualifiedId".equals(fieldName)) { + deserializedPartnerNamespaceProperties.partnerRegistrationFullyQualifiedId = reader.getString(); + } else if ("minimumTlsVersionAllowed".equals(fieldName)) { + deserializedPartnerNamespaceProperties.minimumTlsVersionAllowed + = TlsVersion.fromString(reader.getString()); + } else if ("endpoint".equals(fieldName)) { + deserializedPartnerNamespaceProperties.endpoint = reader.getString(); + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedPartnerNamespaceProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("inboundIpRules".equals(fieldName)) { + List inboundIpRules = reader.readArray(reader1 -> InboundIpRule.fromJson(reader1)); + deserializedPartnerNamespaceProperties.inboundIpRules = inboundIpRules; + } else if ("disableLocalAuth".equals(fieldName)) { + deserializedPartnerNamespaceProperties.disableLocalAuth + = reader.getNullable(JsonReader::getBoolean); + } else if ("partnerTopicRoutingMode".equals(fieldName)) { + deserializedPartnerNamespaceProperties.partnerTopicRoutingMode + = PartnerTopicRoutingMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerNamespaceProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceSharedAccessKeysInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceSharedAccessKeysInner.java index 3ccaa27a61bc6..042a0e53970ce 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceSharedAccessKeysInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceSharedAccessKeysInner.java @@ -5,23 +5,26 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Shared access keys of the partner namespace. */ @Fluent -public final class PartnerNamespaceSharedAccessKeysInner { +public final class PartnerNamespaceSharedAccessKeysInner + implements JsonSerializable { /* * Shared access key1 for the partner namespace. */ - @JsonProperty(value = "key1") private String key1; /* * Shared access key2 for the partner namespace. */ - @JsonProperty(value = "key2") private String key2; /** @@ -77,4 +80,44 @@ public PartnerNamespaceSharedAccessKeysInner withKey2(String key2) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key1", this.key1); + jsonWriter.writeStringField("key2", this.key2); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerNamespaceSharedAccessKeysInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerNamespaceSharedAccessKeysInner 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 PartnerNamespaceSharedAccessKeysInner. + */ + public static PartnerNamespaceSharedAccessKeysInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerNamespaceSharedAccessKeysInner deserializedPartnerNamespaceSharedAccessKeysInner + = new PartnerNamespaceSharedAccessKeysInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key1".equals(fieldName)) { + deserializedPartnerNamespaceSharedAccessKeysInner.key1 = reader.getString(); + } else if ("key2".equals(fieldName)) { + deserializedPartnerNamespaceSharedAccessKeysInner.key2 = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerNamespaceSharedAccessKeysInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceUpdateParameterProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceUpdateParameterProperties.java index 2b663b93655b1..8777f404f74f6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceUpdateParameterProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceUpdateParameterProperties.java @@ -5,40 +5,45 @@ 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.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Information of Partner Namespace update parameter properties. */ @Fluent -public final class PartnerNamespaceUpdateParameterProperties { +public final class PartnerNamespaceUpdateParameterProperties + implements JsonSerializable { /* - * This determines if traffic is allowed over public network. By default it is enabled. - * You can further restrict to specific IPs by configuring + * This determines if traffic is allowed over public network. By default it is enabled. + * You can further restrict to specific IPs by configuring */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ - @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* * Minimum TLS version of the publisher allowed to publish to this domain */ - @JsonProperty(value = "minimumTlsVersionAllowed") private TlsVersion minimumTlsVersionAllowed; /* - * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the partner namespace. + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the partner namespace. */ - @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; /** @@ -153,4 +158,57 @@ public void validate() { inboundIpRules().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeArrayField("inboundIpRules", this.inboundIpRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("minimumTlsVersionAllowed", + this.minimumTlsVersionAllowed == null ? null : this.minimumTlsVersionAllowed.toString()); + jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerNamespaceUpdateParameterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerNamespaceUpdateParameterProperties 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 PartnerNamespaceUpdateParameterProperties. + */ + public static PartnerNamespaceUpdateParameterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerNamespaceUpdateParameterProperties deserializedPartnerNamespaceUpdateParameterProperties + = new PartnerNamespaceUpdateParameterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicNetworkAccess".equals(fieldName)) { + deserializedPartnerNamespaceUpdateParameterProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("inboundIpRules".equals(fieldName)) { + List inboundIpRules = reader.readArray(reader1 -> InboundIpRule.fromJson(reader1)); + deserializedPartnerNamespaceUpdateParameterProperties.inboundIpRules = inboundIpRules; + } else if ("minimumTlsVersionAllowed".equals(fieldName)) { + deserializedPartnerNamespaceUpdateParameterProperties.minimumTlsVersionAllowed + = TlsVersion.fromString(reader.getString()); + } else if ("disableLocalAuth".equals(fieldName)) { + deserializedPartnerNamespaceUpdateParameterProperties.disableLocalAuth + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerNamespaceUpdateParameterProperties; + }); + } } 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 5e29c4f7a61ba..de3739dc71e7a 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 @@ -7,8 +7,11 @@ 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.PartnerRegistrationProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; import java.util.UUID; @@ -20,15 +23,28 @@ public final class PartnerRegistrationInner extends Resource { /* * Properties of the partner registration. */ - @JsonProperty(value = "properties") private PartnerRegistrationProperties innerProperties; /* - * The system metadata relating to Partner Registration resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 PartnerRegistrationInner class. */ @@ -45,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. */ @@ -53,6 +69,36 @@ 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} */ @@ -115,4 +161,57 @@ public void validate() { 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 PartnerRegistrationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerRegistrationInner 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 PartnerRegistrationInner. + */ + public static PartnerRegistrationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerRegistrationInner deserializedPartnerRegistrationInner = new PartnerRegistrationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPartnerRegistrationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPartnerRegistrationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPartnerRegistrationInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPartnerRegistrationInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPartnerRegistrationInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedPartnerRegistrationInner.innerProperties + = PartnerRegistrationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPartnerRegistrationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerRegistrationInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerRegistrationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerRegistrationProperties.java index 9f6165c5c823b..fc9338bb88c4e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerRegistrationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerRegistrationProperties.java @@ -5,26 +5,29 @@ 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.PartnerRegistrationProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; +import java.util.Objects; import java.util.UUID; /** * Properties of the partner registration. */ @Fluent -public final class PartnerRegistrationProperties { +public final class PartnerRegistrationProperties implements JsonSerializable { /* * Provisioning state of the partner registration. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PartnerRegistrationProvisioningState provisioningState; /* * The immutableId of the corresponding partner registration. * Note: This property is marked for deprecation and is not supported in any future GA API version */ - @JsonProperty(value = "partnerRegistrationImmutableId") private UUID partnerRegistrationImmutableId; /** @@ -71,4 +74,46 @@ public PartnerRegistrationProperties withPartnerRegistrationImmutableId(UUID par */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("partnerRegistrationImmutableId", + Objects.toString(this.partnerRegistrationImmutableId, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerRegistrationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerRegistrationProperties 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 PartnerRegistrationProperties. + */ + public static PartnerRegistrationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerRegistrationProperties deserializedPartnerRegistrationProperties + = new PartnerRegistrationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedPartnerRegistrationProperties.provisioningState + = PartnerRegistrationProvisioningState.fromString(reader.getString()); + } else if ("partnerRegistrationImmutableId".equals(fieldName)) { + deserializedPartnerRegistrationProperties.partnerRegistrationImmutableId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerRegistrationProperties; + }); + } } 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 31b0145497de3..c30705edf482f 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 @@ -7,11 +7,14 @@ 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.EventTypeInfo; import com.azure.resourcemanager.eventgrid.models.IdentityInfo; import com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState; import com.azure.resourcemanager.eventgrid.models.PartnerTopicProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; import java.util.UUID; @@ -24,21 +27,33 @@ public final class PartnerTopicInner extends Resource { /* * Properties of the Partner Topic. */ - @JsonProperty(value = "properties") private PartnerTopicProperties innerProperties; /* - * The system metadata relating to Partner Topic resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Identity information for the Partner Topic resource. */ - @JsonProperty(value = "identity") private IdentityInfo identity; + /* + * 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 PartnerTopicInner class. */ @@ -55,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. */ @@ -83,6 +98,36 @@ public PartnerTopicInner withIdentity(IdentityInfo identity) { return this; } + /** + * 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} */ @@ -294,4 +339,59 @@ public void validate() { identity().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); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerTopicInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerTopicInner 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 PartnerTopicInner. + */ + public static PartnerTopicInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerTopicInner deserializedPartnerTopicInner = new PartnerTopicInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPartnerTopicInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPartnerTopicInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPartnerTopicInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPartnerTopicInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPartnerTopicInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedPartnerTopicInner.innerProperties = PartnerTopicProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPartnerTopicInner.systemData = SystemData.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedPartnerTopicInner.identity = IdentityInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerTopicInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerTopicProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerTopicProperties.java index 025338da6072c..8178c77f2bcf6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerTopicProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerTopicProperties.java @@ -5,66 +5,66 @@ 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.EventTypeInfo; import com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState; import com.azure.resourcemanager.eventgrid.models.PartnerTopicProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +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 Topic. */ @Fluent -public final class PartnerTopicProperties { +public final class PartnerTopicProperties implements JsonSerializable { /* * The immutableId of the corresponding partner registration. */ - @JsonProperty(value = "partnerRegistrationImmutableId") private UUID partnerRegistrationImmutableId; /* * Source associated with this partner topic. This represents a unique partner resource. */ - @JsonProperty(value = "source") private String source; /* * Event Type information from the corresponding event channel. */ - @JsonProperty(value = "eventTypeInfo") private EventTypeInfo eventTypeInfo; /* * Expiration time of the partner topic. If this timer expires while the partner topic is still never activated, * the partner topic and corresponding event channel are deleted. */ - @JsonProperty(value = "expirationTimeIfNotActivatedUtc") private OffsetDateTime expirationTimeIfNotActivatedUtc; /* * Provisioning state of the partner topic. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PartnerTopicProvisioningState provisioningState; /* * Activation state of the partner topic. */ - @JsonProperty(value = "activationState") private PartnerTopicActivationState activationState; /* - * Friendly description about the topic. This can be set by the publisher/partner to show custom description for the customer partner topic. + * Friendly description about the topic. This can be set by the publisher/partner to show custom description for the + * customer partner topic. * This will be helpful to remove any ambiguity of the origin of creation of the partner topic for the customer. */ - @JsonProperty(value = "partnerTopicFriendlyDescription") private String partnerTopicFriendlyDescription; /* * Context or helpful message that can be used during the approval process by the subscriber. */ - @JsonProperty(value = "messageForActivation") private String messageForActivation; /** @@ -242,4 +242,69 @@ public void validate() { eventTypeInfo().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("partnerRegistrationImmutableId", + Objects.toString(this.partnerRegistrationImmutableId, null)); + jsonWriter.writeStringField("source", this.source); + jsonWriter.writeJsonField("eventTypeInfo", this.eventTypeInfo); + 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("partnerTopicFriendlyDescription", this.partnerTopicFriendlyDescription); + jsonWriter.writeStringField("messageForActivation", this.messageForActivation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerTopicProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerTopicProperties 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 PartnerTopicProperties. + */ + public static PartnerTopicProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerTopicProperties deserializedPartnerTopicProperties = new PartnerTopicProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("partnerRegistrationImmutableId".equals(fieldName)) { + deserializedPartnerTopicProperties.partnerRegistrationImmutableId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("source".equals(fieldName)) { + deserializedPartnerTopicProperties.source = reader.getString(); + } else if ("eventTypeInfo".equals(fieldName)) { + deserializedPartnerTopicProperties.eventTypeInfo = EventTypeInfo.fromJson(reader); + } else if ("expirationTimeIfNotActivatedUtc".equals(fieldName)) { + deserializedPartnerTopicProperties.expirationTimeIfNotActivatedUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedPartnerTopicProperties.provisioningState + = PartnerTopicProvisioningState.fromString(reader.getString()); + } else if ("activationState".equals(fieldName)) { + deserializedPartnerTopicProperties.activationState + = PartnerTopicActivationState.fromString(reader.getString()); + } else if ("partnerTopicFriendlyDescription".equals(fieldName)) { + deserializedPartnerTopicProperties.partnerTopicFriendlyDescription = reader.getString(); + } else if ("messageForActivation".equals(fieldName)) { + deserializedPartnerTopicProperties.messageForActivation = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerTopicProperties; + }); + } } 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 f1824a8d3adf9..1de668e279cfb 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 @@ -7,9 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.PermissionBindingProvisioningState; import com.azure.resourcemanager.eventgrid.models.PermissionType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The Permission binding resource. @@ -19,15 +22,28 @@ public final class PermissionBindingInner extends ProxyResource { /* * The properties of permission binding. */ - @JsonProperty(value = "properties") private PermissionBindingProperties innerProperties; /* - * The system metadata relating to the PermissionBinding resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 PermissionBindingInner class. */ @@ -44,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. */ @@ -52,6 +68,36 @@ 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; + } + /** * Get the description property: Description for the Permission Binding resource. * @@ -167,4 +213,49 @@ public void validate() { 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 PermissionBindingInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PermissionBindingInner 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 PermissionBindingInner. + */ + public static PermissionBindingInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PermissionBindingInner deserializedPermissionBindingInner = new PermissionBindingInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPermissionBindingInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPermissionBindingInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPermissionBindingInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPermissionBindingInner.innerProperties = PermissionBindingProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPermissionBindingInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPermissionBindingInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PermissionBindingProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PermissionBindingProperties.java index f47855059070a..c00bab1ee85dd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PermissionBindingProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PermissionBindingProperties.java @@ -5,45 +5,44 @@ 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.PermissionBindingProvisioningState; import com.azure.resourcemanager.eventgrid.models.PermissionType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties of permission binding. */ @Fluent -public final class PermissionBindingProperties { +public final class PermissionBindingProperties implements JsonSerializable { /* * Description for the Permission Binding resource. */ - @JsonProperty(value = "description") private String description; /* * The name of the Topic Space resource that the permission is bound to. * The Topic space needs to be a resource under the same namespace the permission binding is a part of. */ - @JsonProperty(value = "topicSpaceName") private String topicSpaceName; /* * The allowed permission. */ - @JsonProperty(value = "permission") private PermissionType permission; /* * The name of the client group resource that the permission is bound to. * The client group needs to be a resource under the same namespace the permission binding is a part of. */ - @JsonProperty(value = "clientGroupName") private String clientGroupName; /* * Provisioning state of the PermissionBinding resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PermissionBindingProvisioningState provisioningState; /** @@ -152,4 +151,52 @@ public PermissionBindingProvisioningState provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("topicSpaceName", this.topicSpaceName); + jsonWriter.writeStringField("permission", this.permission == null ? null : this.permission.toString()); + jsonWriter.writeStringField("clientGroupName", this.clientGroupName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PermissionBindingProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PermissionBindingProperties 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 PermissionBindingProperties. + */ + public static PermissionBindingProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PermissionBindingProperties deserializedPermissionBindingProperties = new PermissionBindingProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedPermissionBindingProperties.description = reader.getString(); + } else if ("topicSpaceName".equals(fieldName)) { + deserializedPermissionBindingProperties.topicSpaceName = reader.getString(); + } else if ("permission".equals(fieldName)) { + deserializedPermissionBindingProperties.permission = PermissionType.fromString(reader.getString()); + } else if ("clientGroupName".equals(fieldName)) { + deserializedPermissionBindingProperties.clientGroupName = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedPermissionBindingProperties.provisioningState + = PermissionBindingProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPermissionBindingProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateEndpointConnectionInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateEndpointConnectionInner.java index 81e8a08f9b3de..5c008d637338c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateEndpointConnectionInner.java @@ -6,10 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.eventgrid.models.ConnectionState; import com.azure.resourcemanager.eventgrid.models.PrivateEndpoint; import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -20,9 +23,23 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { /* * Properties of the PrivateEndpointConnection. */ - @JsonProperty(value = "properties") private PrivateEndpointConnectionProperties innerProperties; + /* + * 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 PrivateEndpointConnectionInner class. */ @@ -38,6 +55,36 @@ private PrivateEndpointConnectionProperties innerProperties() { return this.innerProperties; } + /** + * 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; + } + /** * Get the privateEndpoint property: The Private Endpoint resource for this Connection. * @@ -141,4 +188,49 @@ public void validate() { 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 PrivateEndpointConnectionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionInner 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 PrivateEndpointConnectionInner. + */ + public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner + = new PrivateEndpointConnectionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.innerProperties + = PrivateEndpointConnectionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateEndpointConnectionProperties.java index 34861d66a2422..8b4c6cb13954b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateEndpointConnectionProperties.java @@ -5,39 +5,40 @@ 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.ConnectionState; import com.azure.resourcemanager.eventgrid.models.PrivateEndpoint; import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Properties of the private endpoint connection resource. */ @Fluent -public final class PrivateEndpointConnectionProperties { +public final class PrivateEndpointConnectionProperties + implements JsonSerializable { /* * The Private Endpoint resource for this Connection. */ - @JsonProperty(value = "privateEndpoint") private PrivateEndpoint privateEndpoint; /* * GroupIds from the private link service resource. */ - @JsonProperty(value = "groupIds") private List groupIds; /* * Details about the state of the connection. */ - @JsonProperty(value = "privateLinkServiceConnectionState") private ConnectionState privateLinkServiceConnectionState; /* * Provisioning state of the Private Endpoint Connection. */ - @JsonProperty(value = "provisioningState") private ResourceProvisioningState provisioningState; /** @@ -140,4 +141,54 @@ public void validate() { privateLinkServiceConnectionState().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); + jsonWriter.writeArrayField("groupIds", this.groupIds, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); + jsonWriter.writeStringField("provisioningState", + this.provisioningState == null ? null : this.provisioningState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionProperties 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 PrivateEndpointConnectionProperties. + */ + public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties + = new PrivateEndpointConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateEndpoint".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); + } else if ("groupIds".equals(fieldName)) { + List groupIds = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateEndpointConnectionProperties.groupIds = groupIds; + } else if ("privateLinkServiceConnectionState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState + = ConnectionState.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.provisioningState + = ResourceProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateLinkResourceInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateLinkResourceInner.java index 5d4cf82478b14..e293032352f36 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateLinkResourceInner.java @@ -5,36 +5,36 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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; /** * Information of the private link resource. */ @Fluent -public final class PrivateLinkResourceInner { +public final class PrivateLinkResourceInner implements JsonSerializable { /* * Properties of the private link resource. */ - @JsonProperty(value = "properties") private PrivateLinkResourceProperties innerProperties; /* * Fully qualified identifier of the resource. */ - @JsonProperty(value = "id") private String id; /* * Name of the resource. */ - @JsonProperty(value = "name") private String name; /* * Type of the resource. */ - @JsonProperty(value = "type") private String type; /** @@ -214,4 +214,50 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceInner 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 PrivateLinkResourceInner. + */ + public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedPrivateLinkResourceInner.innerProperties + = PrivateLinkResourceProperties.fromJson(reader); + } else if ("id".equals(fieldName)) { + deserializedPrivateLinkResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkResourceInner.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateLinkResourceProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateLinkResourceProperties.java index 53a75cbf0c15d..cf2a9fadb7ed3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateLinkResourceProperties.java @@ -5,36 +5,36 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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; /** * The PrivateLinkResourceProperties model. */ @Fluent -public final class PrivateLinkResourceProperties { +public final class PrivateLinkResourceProperties implements JsonSerializable { /* * The groupId property. */ - @JsonProperty(value = "groupId") private String groupId; /* * The displayName property. */ - @JsonProperty(value = "displayName") private String displayName; /* * The requiredMembers property. */ - @JsonProperty(value = "requiredMembers") private List requiredMembers; /* * The requiredZoneNames property. */ - @JsonProperty(value = "requiredZoneNames") private List requiredZoneNames; /** @@ -130,4 +130,54 @@ public PrivateLinkResourceProperties withRequiredZoneNames(List required */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("groupId", this.groupId); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeArrayField("requiredMembers", this.requiredMembers, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceProperties 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 PrivateLinkResourceProperties. + */ + public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties + = new PrivateLinkResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupId".equals(fieldName)) { + deserializedPrivateLinkResourceProperties.groupId = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedPrivateLinkResourceProperties.displayName = reader.getString(); + } else if ("requiredMembers".equals(fieldName)) { + List requiredMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers; + } else if ("requiredZoneNames".equals(fieldName)) { + List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusQueueEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusQueueEventSubscriptionDestinationProperties.java index c6a90deb33b6b..e76c82bc5d0c1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusQueueEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusQueueEventSubscriptionDestinationProperties.java @@ -5,25 +5,28 @@ 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.DeliveryAttributeMapping; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties that represent the Service Bus destination of an event subscription. */ @Fluent -public final class ServiceBusQueueEventSubscriptionDestinationProperties { +public final class ServiceBusQueueEventSubscriptionDestinationProperties + implements JsonSerializable { /* * The Azure Resource Id that represents the endpoint of the Service Bus destination of an event subscription. */ - @JsonProperty(value = "resourceId") private String resourceId; /* * Delivery attribute details. */ - @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; /** @@ -85,4 +88,49 @@ public void validate() { deliveryAttributeMappings().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeArrayField("deliveryAttributeMappings", this.deliveryAttributeMappings, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceBusQueueEventSubscriptionDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceBusQueueEventSubscriptionDestinationProperties 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 ServiceBusQueueEventSubscriptionDestinationProperties. + */ + public static ServiceBusQueueEventSubscriptionDestinationProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ServiceBusQueueEventSubscriptionDestinationProperties deserializedServiceBusQueueEventSubscriptionDestinationProperties + = new ServiceBusQueueEventSubscriptionDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedServiceBusQueueEventSubscriptionDestinationProperties.resourceId = reader.getString(); + } else if ("deliveryAttributeMappings".equals(fieldName)) { + List deliveryAttributeMappings + = reader.readArray(reader1 -> DeliveryAttributeMapping.fromJson(reader1)); + deserializedServiceBusQueueEventSubscriptionDestinationProperties.deliveryAttributeMappings + = deliveryAttributeMappings; + } else { + reader.skipChildren(); + } + } + + return deserializedServiceBusQueueEventSubscriptionDestinationProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusTopicEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusTopicEventSubscriptionDestinationProperties.java index 317a1cf68f613..b8d3b4eb3a2c9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusTopicEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusTopicEventSubscriptionDestinationProperties.java @@ -5,25 +5,28 @@ 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.DeliveryAttributeMapping; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties that represent the Service Bus Topic destination of an event subscription. */ @Fluent -public final class ServiceBusTopicEventSubscriptionDestinationProperties { +public final class ServiceBusTopicEventSubscriptionDestinationProperties + implements JsonSerializable { /* * The Azure Resource Id that represents the endpoint of the Service Bus Topic destination of an event subscription. */ - @JsonProperty(value = "resourceId") private String resourceId; /* * Delivery attribute details. */ - @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; /** @@ -85,4 +88,49 @@ public void validate() { deliveryAttributeMappings().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeArrayField("deliveryAttributeMappings", this.deliveryAttributeMappings, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceBusTopicEventSubscriptionDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceBusTopicEventSubscriptionDestinationProperties 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 ServiceBusTopicEventSubscriptionDestinationProperties. + */ + public static ServiceBusTopicEventSubscriptionDestinationProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ServiceBusTopicEventSubscriptionDestinationProperties deserializedServiceBusTopicEventSubscriptionDestinationProperties + = new ServiceBusTopicEventSubscriptionDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedServiceBusTopicEventSubscriptionDestinationProperties.resourceId = reader.getString(); + } else if ("deliveryAttributeMappings".equals(fieldName)) { + List deliveryAttributeMappings + = reader.readArray(reader1 -> DeliveryAttributeMapping.fromJson(reader1)); + deserializedServiceBusTopicEventSubscriptionDestinationProperties.deliveryAttributeMappings + = deliveryAttributeMappings; + } else { + reader.skipChildren(); + } + } + + return deserializedServiceBusTopicEventSubscriptionDestinationProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StaticDeliveryAttributeMappingProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StaticDeliveryAttributeMappingProperties.java index d3b186c12cba8..5cb1c9b7500fb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StaticDeliveryAttributeMappingProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StaticDeliveryAttributeMappingProperties.java @@ -5,23 +5,26 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 static delivery attribute mapping. */ @Fluent -public final class StaticDeliveryAttributeMappingProperties { +public final class StaticDeliveryAttributeMappingProperties + implements JsonSerializable { /* * Value of the delivery attribute. */ - @JsonProperty(value = "value") private String value; /* * Boolean flag to tell if the attribute contains sensitive information . */ - @JsonProperty(value = "isSecret") private Boolean isSecret; /** @@ -77,4 +80,45 @@ public StaticDeliveryAttributeMappingProperties withIsSecret(Boolean isSecret) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeBooleanField("isSecret", this.isSecret); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticDeliveryAttributeMappingProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticDeliveryAttributeMappingProperties 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 StaticDeliveryAttributeMappingProperties. + */ + public static StaticDeliveryAttributeMappingProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticDeliveryAttributeMappingProperties deserializedStaticDeliveryAttributeMappingProperties + = new StaticDeliveryAttributeMappingProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedStaticDeliveryAttributeMappingProperties.value = reader.getString(); + } else if ("isSecret".equals(fieldName)) { + deserializedStaticDeliveryAttributeMappingProperties.isSecret + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedStaticDeliveryAttributeMappingProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageBlobDeadLetterDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageBlobDeadLetterDestinationProperties.java index 746820aa4ca9a..315d8469ce169 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageBlobDeadLetterDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageBlobDeadLetterDestinationProperties.java @@ -5,23 +5,26 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 storage blob based dead letter destination. */ @Fluent -public final class StorageBlobDeadLetterDestinationProperties { +public final class StorageBlobDeadLetterDestinationProperties + implements JsonSerializable { /* * The Azure Resource ID of the storage account that is the destination of the deadletter events */ - @JsonProperty(value = "resourceId") private String resourceId; /* * The name of the Storage blob container that is the destination of the deadletter events */ - @JsonProperty(value = "blobContainerName") private String blobContainerName; /** @@ -81,4 +84,44 @@ public StorageBlobDeadLetterDestinationProperties withBlobContainerName(String b */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("blobContainerName", this.blobContainerName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageBlobDeadLetterDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageBlobDeadLetterDestinationProperties 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 StorageBlobDeadLetterDestinationProperties. + */ + public static StorageBlobDeadLetterDestinationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageBlobDeadLetterDestinationProperties deserializedStorageBlobDeadLetterDestinationProperties + = new StorageBlobDeadLetterDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedStorageBlobDeadLetterDestinationProperties.resourceId = reader.getString(); + } else if ("blobContainerName".equals(fieldName)) { + deserializedStorageBlobDeadLetterDestinationProperties.blobContainerName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageBlobDeadLetterDestinationProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageQueueEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageQueueEventSubscriptionDestinationProperties.java index 443cea355e220..2a78b71d70235 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageQueueEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageQueueEventSubscriptionDestinationProperties.java @@ -5,29 +5,33 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 properties for a storage queue destination. */ @Fluent -public final class StorageQueueEventSubscriptionDestinationProperties { +public final class StorageQueueEventSubscriptionDestinationProperties + implements JsonSerializable { /* - * The Azure Resource ID of the storage account that contains the queue that is the destination of an event subscription. + * The Azure Resource ID of the storage account that contains the queue that is the destination of an event + * subscription. */ - @JsonProperty(value = "resourceId") private String resourceId; /* * The name of the Storage queue under a storage account that is the destination of an event subscription. */ - @JsonProperty(value = "queueName") private String queueName; /* - * Storage queue message time to live in seconds. This value cannot be zero or negative with the exception of using -1 to indicate that the Time To Live of the message is Infinite. + * Storage queue message time to live in seconds. This value cannot be zero or negative with the exception of using + * -1 to indicate that the Time To Live of the message is Infinite. */ - @JsonProperty(value = "queueMessageTimeToLiveInSeconds") private Long queueMessageTimeToLiveInSeconds; /** @@ -112,4 +116,49 @@ public Long queueMessageTimeToLiveInSeconds() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("queueName", this.queueName); + jsonWriter.writeNumberField("queueMessageTimeToLiveInSeconds", this.queueMessageTimeToLiveInSeconds); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageQueueEventSubscriptionDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageQueueEventSubscriptionDestinationProperties 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 StorageQueueEventSubscriptionDestinationProperties. + */ + public static StorageQueueEventSubscriptionDestinationProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + StorageQueueEventSubscriptionDestinationProperties deserializedStorageQueueEventSubscriptionDestinationProperties + = new StorageQueueEventSubscriptionDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedStorageQueueEventSubscriptionDestinationProperties.resourceId = reader.getString(); + } else if ("queueName".equals(fieldName)) { + deserializedStorageQueueEventSubscriptionDestinationProperties.queueName = reader.getString(); + } else if ("queueMessageTimeToLiveInSeconds".equals(fieldName)) { + deserializedStorageQueueEventSubscriptionDestinationProperties.queueMessageTimeToLiveInSeconds + = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageQueueEventSubscriptionDestinationProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionFullUrlInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionFullUrlInner.java index a119810c42337..c9828e67c28b4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionFullUrlInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionFullUrlInner.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Full endpoint URL of an event subscription. */ @Fluent -public final class SubscriptionFullUrlInner { +public final class SubscriptionFullUrlInner implements JsonSerializable { /* * The URL that represents the endpoint of the destination of an event subscription. */ - @JsonProperty(value = "endpointUrl") private String endpointUrl; /** @@ -51,4 +54,40 @@ public SubscriptionFullUrlInner withEndpointUrl(String endpointUrl) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("endpointUrl", this.endpointUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionFullUrlInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionFullUrlInner 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 SubscriptionFullUrlInner. + */ + public static SubscriptionFullUrlInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionFullUrlInner deserializedSubscriptionFullUrlInner = new SubscriptionFullUrlInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointUrl".equals(fieldName)) { + deserializedSubscriptionFullUrlInner.endpointUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionFullUrlInner; + }); + } } 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 a2c82e8109048..76dd336af53d2 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 @@ -7,12 +7,16 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.DeliveryConfiguration; import com.azure.resourcemanager.eventgrid.models.DeliverySchema; import com.azure.resourcemanager.eventgrid.models.FiltersConfiguration; import com.azure.resourcemanager.eventgrid.models.SubscriptionProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Map; /** * Event Subscription. @@ -22,15 +26,28 @@ public final class SubscriptionInner extends ProxyResource { /* * Properties of the event subscription. */ - @JsonProperty(value = "properties") private SubscriptionProperties innerProperties; /* - * The system metadata relating to Event Subscription resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 SubscriptionInner class. */ @@ -47,7 +64,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. */ @@ -55,6 +72,36 @@ 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; + } + /** * Get the provisioningState property: Provisioning state of the event subscription. * @@ -156,6 +203,29 @@ public SubscriptionInner withExpirationTimeUtc(OffsetDateTime expirationTimeUtc) return this; } + /** + * Get the tags property: Tags relating to Event Subscription resource. + * + * @return the tags value. + */ + public Map tags() { + return this.innerProperties() == null ? null : this.innerProperties().tags(); + } + + /** + * Set the tags property: Tags relating to Event Subscription resource. + * + * @param tags the tags value to set. + * @return the SubscriptionInner object itself. + */ + public SubscriptionInner withTags(Map tags) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionProperties(); + } + this.innerProperties().withTags(tags); + return this; + } + /** * Validates the instance. * @@ -166,4 +236,49 @@ public void validate() { 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 SubscriptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionInner 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 SubscriptionInner. + */ + public static SubscriptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionInner deserializedSubscriptionInner = new SubscriptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSubscriptionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSubscriptionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSubscriptionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSubscriptionInner.innerProperties = SubscriptionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSubscriptionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionProperties.java index 7934fd1ddd817..1354d1d0194f9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionProperties.java @@ -5,48 +5,55 @@ 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.DeliveryConfiguration; import com.azure.resourcemanager.eventgrid.models.DeliverySchema; import com.azure.resourcemanager.eventgrid.models.FiltersConfiguration; import com.azure.resourcemanager.eventgrid.models.SubscriptionProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; /** * Properties of the event subscription. */ @Fluent -public final class SubscriptionProperties { +public final class SubscriptionProperties implements JsonSerializable { /* * Provisioning state of the event subscription. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private SubscriptionProvisioningState provisioningState; /* * Information about the delivery configuration of the event subscription. */ - @JsonProperty(value = "deliveryConfiguration") private DeliveryConfiguration deliveryConfiguration; /* * The event delivery schema for the event subscription. */ - @JsonProperty(value = "eventDeliverySchema") private DeliverySchema eventDeliverySchema; /* * Information about the filter for the event subscription. */ - @JsonProperty(value = "filtersConfiguration") private FiltersConfiguration filtersConfiguration; /* * Expiration time of the event subscription. */ - @JsonProperty(value = "expirationTimeUtc") private OffsetDateTime expirationTimeUtc; + /* + * Tags relating to Event Subscription resource. + */ + private Map tags; + /** * Creates an instance of SubscriptionProperties class. */ @@ -142,6 +149,26 @@ public SubscriptionProperties withExpirationTimeUtc(OffsetDateTime expirationTim return this; } + /** + * Get the tags property: Tags relating to Event Subscription resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Tags relating to Event Subscription resource. + * + * @param tags the tags value to set. + * @return the SubscriptionProperties object itself. + */ + public SubscriptionProperties withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Validates the instance. * @@ -155,4 +182,62 @@ public void validate() { filtersConfiguration().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("deliveryConfiguration", this.deliveryConfiguration); + jsonWriter.writeStringField("eventDeliverySchema", + this.eventDeliverySchema == null ? null : this.eventDeliverySchema.toString()); + jsonWriter.writeJsonField("filtersConfiguration", this.filtersConfiguration); + jsonWriter.writeStringField("expirationTimeUtc", + this.expirationTimeUtc == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationTimeUtc)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionProperties 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 SubscriptionProperties. + */ + public static SubscriptionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionProperties deserializedSubscriptionProperties = new SubscriptionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedSubscriptionProperties.provisioningState + = SubscriptionProvisioningState.fromString(reader.getString()); + } else if ("deliveryConfiguration".equals(fieldName)) { + deserializedSubscriptionProperties.deliveryConfiguration = DeliveryConfiguration.fromJson(reader); + } else if ("eventDeliverySchema".equals(fieldName)) { + deserializedSubscriptionProperties.eventDeliverySchema + = DeliverySchema.fromString(reader.getString()); + } else if ("filtersConfiguration".equals(fieldName)) { + deserializedSubscriptionProperties.filtersConfiguration = FiltersConfiguration.fromJson(reader); + } else if ("expirationTimeUtc".equals(fieldName)) { + deserializedSubscriptionProperties.expirationTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSubscriptionProperties.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionUpdateParametersProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionUpdateParametersProperties.java index 2cd1704759cc6..32eeab58cc2b3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionUpdateParametersProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionUpdateParametersProperties.java @@ -5,41 +5,50 @@ 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.DeliveryConfiguration; import com.azure.resourcemanager.eventgrid.models.DeliverySchema; import com.azure.resourcemanager.eventgrid.models.FiltersConfiguration; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; /** * Properties of the Event Subscription update parameters. */ @Fluent -public final class SubscriptionUpdateParametersProperties { +public final class SubscriptionUpdateParametersProperties + implements JsonSerializable { /* * Information about the delivery configuration of the event subscription. */ - @JsonProperty(value = "deliveryConfiguration") private DeliveryConfiguration deliveryConfiguration; /* * The event delivery schema for the event subscription. */ - @JsonProperty(value = "eventDeliverySchema") private DeliverySchema eventDeliverySchema; /* * Information about the filter for the event subscription. */ - @JsonProperty(value = "filtersConfiguration") private FiltersConfiguration filtersConfiguration; /* * Expiration time of the event subscription. */ - @JsonProperty(value = "expirationTimeUtc") private OffsetDateTime expirationTimeUtc; + /* + * Tags relating to Event Subscription resource. + */ + private Map tags; + /** * Creates an instance of SubscriptionUpdateParametersProperties class. */ @@ -127,6 +136,26 @@ public SubscriptionUpdateParametersProperties withExpirationTimeUtc(OffsetDateTi return this; } + /** + * Get the tags property: Tags relating to Event Subscription resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Tags relating to Event Subscription resource. + * + * @param tags the tags value to set. + * @return the SubscriptionUpdateParametersProperties object itself. + */ + public SubscriptionUpdateParametersProperties withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Validates the instance. * @@ -140,4 +169,62 @@ public void validate() { filtersConfiguration().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("deliveryConfiguration", this.deliveryConfiguration); + jsonWriter.writeStringField("eventDeliverySchema", + this.eventDeliverySchema == null ? null : this.eventDeliverySchema.toString()); + jsonWriter.writeJsonField("filtersConfiguration", this.filtersConfiguration); + jsonWriter.writeStringField("expirationTimeUtc", + this.expirationTimeUtc == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationTimeUtc)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionUpdateParametersProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionUpdateParametersProperties 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 SubscriptionUpdateParametersProperties. + */ + public static SubscriptionUpdateParametersProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionUpdateParametersProperties deserializedSubscriptionUpdateParametersProperties + = new SubscriptionUpdateParametersProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deliveryConfiguration".equals(fieldName)) { + deserializedSubscriptionUpdateParametersProperties.deliveryConfiguration + = DeliveryConfiguration.fromJson(reader); + } else if ("eventDeliverySchema".equals(fieldName)) { + deserializedSubscriptionUpdateParametersProperties.eventDeliverySchema + = DeliverySchema.fromString(reader.getString()); + } else if ("filtersConfiguration".equals(fieldName)) { + deserializedSubscriptionUpdateParametersProperties.filtersConfiguration + = FiltersConfiguration.fromJson(reader); + } else if ("expirationTimeUtc".equals(fieldName)) { + deserializedSubscriptionUpdateParametersProperties.expirationTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSubscriptionUpdateParametersProperties.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionUpdateParametersProperties; + }); + } } 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 f44526d9a978c..26dae4262c4e7 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 @@ -7,9 +7,12 @@ 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.IdentityInfo; import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -20,21 +23,33 @@ public final class SystemTopicInner extends Resource { /* * Properties of the system topic. */ - @JsonProperty(value = "properties") private SystemTopicProperties innerProperties; /* - * The system metadata relating to System Topic resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Identity information for the resource. */ - @JsonProperty(value = "identity") private IdentityInfo identity; + /* + * 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 SystemTopicInner class. */ @@ -51,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. */ @@ -79,6 +94,36 @@ public SystemTopicInner withIdentity(IdentityInfo identity) { return this; } + /** + * 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} */ @@ -174,4 +219,59 @@ public void validate() { identity().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); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SystemTopicInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SystemTopicInner 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 SystemTopicInner. + */ + public static SystemTopicInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SystemTopicInner deserializedSystemTopicInner = new SystemTopicInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSystemTopicInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSystemTopicInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSystemTopicInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedSystemTopicInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSystemTopicInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedSystemTopicInner.innerProperties = SystemTopicProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSystemTopicInner.systemData = SystemData.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedSystemTopicInner.identity = IdentityInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSystemTopicInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicProperties.java index e01a253fd4099..b9076d6777f78 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicProperties.java @@ -5,36 +5,36 @@ 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.ResourceProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Properties of the System Topic. */ @Fluent -public final class SystemTopicProperties { +public final class SystemTopicProperties implements JsonSerializable { /* * Provisioning state of the system topic. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ResourceProvisioningState provisioningState; /* * Source for the system topic. */ - @JsonProperty(value = "source") private String source; /* * TopicType for the system topic. */ - @JsonProperty(value = "topicType") private String topicType; /* * Metric resource id for the system topic. */ - @JsonProperty(value = "metricResourceId", access = JsonProperty.Access.WRITE_ONLY) private String metricResourceId; /** @@ -108,4 +108,48 @@ public String metricResourceId() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("source", this.source); + jsonWriter.writeStringField("topicType", this.topicType); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SystemTopicProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SystemTopicProperties 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 SystemTopicProperties. + */ + public static SystemTopicProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SystemTopicProperties deserializedSystemTopicProperties = new SystemTopicProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedSystemTopicProperties.provisioningState + = ResourceProvisioningState.fromString(reader.getString()); + } else if ("source".equals(fieldName)) { + deserializedSystemTopicProperties.source = reader.getString(); + } else if ("topicType".equals(fieldName)) { + deserializedSystemTopicProperties.topicType = reader.getString(); + } else if ("metricResourceId".equals(fieldName)) { + deserializedSystemTopicProperties.metricResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSystemTopicProperties; + }); + } } 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 0cf21b3364afa..e7dd8e07cc431 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 @@ -7,6 +7,9 @@ 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.DataResidencyBoundary; import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; @@ -19,7 +22,7 @@ import com.azure.resourcemanager.eventgrid.models.ResourceSku; import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.azure.resourcemanager.eventgrid.models.TopicProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -31,39 +34,48 @@ public final class TopicInner extends Resource { /* * Properties of the topic. */ - @JsonProperty(value = "properties") private TopicProperties innerProperties; /* * The Sku pricing tier for the topic. */ - @JsonProperty(value = "sku") private ResourceSku sku; /* * Identity information for the resource. */ - @JsonProperty(value = "identity") private IdentityInfo identity; /* * Kind of the resource. */ - @JsonProperty(value = "kind") private ResourceKind kind; /* * Extended location of the resource. */ - @JsonProperty(value = "extendedLocation") private ExtendedLocation extendedLocation; /* - * The system metadata relating to Topic resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 TopicInner class. */ @@ -160,7 +172,7 @@ public TopicInner withExtendedLocation(ExtendedLocation extendedLocation) { } /** - * 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. */ @@ -168,6 +180,36 @@ 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} */ @@ -447,4 +489,68 @@ public void validate() { extendedLocation().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); + 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(); + } + + /** + * Reads an instance of TopicInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicInner 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 TopicInner. + */ + public static TopicInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicInner deserializedTopicInner = new TopicInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTopicInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTopicInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTopicInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedTopicInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + 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 { + reader.skipChildren(); + } + } + + return deserializedTopicInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicProperties.java index 790be781890c3..52456467997cb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicProperties.java @@ -5,6 +5,10 @@ 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.DataResidencyBoundary; import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; @@ -13,86 +17,78 @@ import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.azure.resourcemanager.eventgrid.models.TopicProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Properties of the Topic. */ @Fluent -public final class TopicProperties { +public final class TopicProperties implements JsonSerializable { /* * List of private endpoint connections. */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; /* * Provisioning state of the topic. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private TopicProvisioningState provisioningState; /* * Endpoint for the topic. */ - @JsonProperty(value = "endpoint", access = JsonProperty.Access.WRITE_ONLY) private String endpoint; /* - * Event Type Information for the user topic. This information is provided by the publisher and can be used by the + * Event Type Information for the user topic. This information is provided by the publisher and can be used by the * subscriber to view different types of events that are published. */ - @JsonProperty(value = "eventTypeInfo") private EventTypeInfo eventTypeInfo; /* * Minimum TLS version of the publisher allowed to publish to this topic */ - @JsonProperty(value = "minimumTlsVersionAllowed") private TlsVersion minimumTlsVersionAllowed; /* * This determines the format that Event Grid should expect for incoming events published to the topic. */ - @JsonProperty(value = "inputSchema") private InputSchema inputSchema; /* - * This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema. + * This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the EventGridEvent schema. */ - @JsonProperty(value = "inputSchemaMapping") private InputSchemaMapping inputSchemaMapping; /* * Metric resource id for the topic. */ - @JsonProperty(value = "metricResourceId", access = JsonProperty.Access.WRITE_ONLY) private String metricResourceId; /* - * This determines if traffic is allowed over public network. By default it is enabled. - * You can further restrict to specific IPs by configuring + * This determines if traffic is allowed over public network. By default it is enabled. + * You can further restrict to specific IPs by configuring */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ - @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* - * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the topic. + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the topic. */ - @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; /* * Data Residency Boundary of the resource. */ - @JsonProperty(value = "dataResidencyBoundary") private DataResidencyBoundary dataResidencyBoundary; /** @@ -338,4 +334,79 @@ public void validate() { inboundIpRules().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("eventTypeInfo", this.eventTypeInfo); + jsonWriter.writeStringField("minimumTlsVersionAllowed", + this.minimumTlsVersionAllowed == null ? null : this.minimumTlsVersionAllowed.toString()); + jsonWriter.writeStringField("inputSchema", this.inputSchema == null ? null : this.inputSchema.toString()); + jsonWriter.writeJsonField("inputSchemaMapping", this.inputSchemaMapping); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeArrayField("inboundIpRules", this.inboundIpRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth); + jsonWriter.writeStringField("dataResidencyBoundary", + this.dataResidencyBoundary == null ? null : this.dataResidencyBoundary.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopicProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicProperties 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 TopicProperties. + */ + public static TopicProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicProperties deserializedTopicProperties = new TopicProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedTopicProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("provisioningState".equals(fieldName)) { + deserializedTopicProperties.provisioningState + = TopicProvisioningState.fromString(reader.getString()); + } else if ("endpoint".equals(fieldName)) { + deserializedTopicProperties.endpoint = reader.getString(); + } else if ("eventTypeInfo".equals(fieldName)) { + deserializedTopicProperties.eventTypeInfo = EventTypeInfo.fromJson(reader); + } else if ("minimumTlsVersionAllowed".equals(fieldName)) { + deserializedTopicProperties.minimumTlsVersionAllowed = TlsVersion.fromString(reader.getString()); + } else if ("inputSchema".equals(fieldName)) { + deserializedTopicProperties.inputSchema = InputSchema.fromString(reader.getString()); + } else if ("inputSchemaMapping".equals(fieldName)) { + deserializedTopicProperties.inputSchemaMapping = InputSchemaMapping.fromJson(reader); + } else if ("metricResourceId".equals(fieldName)) { + deserializedTopicProperties.metricResourceId = reader.getString(); + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedTopicProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("inboundIpRules".equals(fieldName)) { + List inboundIpRules = reader.readArray(reader1 -> InboundIpRule.fromJson(reader1)); + deserializedTopicProperties.inboundIpRules = inboundIpRules; + } else if ("disableLocalAuth".equals(fieldName)) { + deserializedTopicProperties.disableLocalAuth = reader.getNullable(JsonReader::getBoolean); + } else if ("dataResidencyBoundary".equals(fieldName)) { + deserializedTopicProperties.dataResidencyBoundary + = DataResidencyBoundary.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedTopicProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSharedAccessKeysInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSharedAccessKeysInner.java index 9684656f6b97e..9c39fbeccd852 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSharedAccessKeysInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSharedAccessKeysInner.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Shared access keys of the Topic. */ @Fluent -public final class TopicSharedAccessKeysInner { +public final class TopicSharedAccessKeysInner implements JsonSerializable { /* * Shared access key1 for the topic. */ - @JsonProperty(value = "key1") private String key1; /* * Shared access key2 for the topic. */ - @JsonProperty(value = "key2") private String key2; /** @@ -77,4 +79,43 @@ public TopicSharedAccessKeysInner withKey2(String key2) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key1", this.key1); + jsonWriter.writeStringField("key2", this.key2); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopicSharedAccessKeysInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicSharedAccessKeysInner 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 TopicSharedAccessKeysInner. + */ + public static TopicSharedAccessKeysInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicSharedAccessKeysInner deserializedTopicSharedAccessKeysInner = new TopicSharedAccessKeysInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key1".equals(fieldName)) { + deserializedTopicSharedAccessKeysInner.key1 = reader.getString(); + } else if ("key2".equals(fieldName)) { + deserializedTopicSharedAccessKeysInner.key2 = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTopicSharedAccessKeysInner; + }); + } } 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 5c7852e6440ea..b64f8bdba8660 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 @@ -7,8 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.TopicSpaceProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -19,15 +22,28 @@ public final class TopicSpaceInner extends ProxyResource { /* * The properties of topic space. */ - @JsonProperty(value = "properties") private TopicSpaceProperties innerProperties; /* - * The system metadata relating to the TopicSpace resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 TopicSpaceInner class. */ @@ -44,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. */ @@ -52,6 +68,36 @@ 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; + } + /** * Get the description property: Description for the Topic Space resource. * @@ -125,4 +171,49 @@ public void validate() { 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 TopicSpaceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicSpaceInner 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 TopicSpaceInner. + */ + public static TopicSpaceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicSpaceInner deserializedTopicSpaceInner = new TopicSpaceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTopicSpaceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTopicSpaceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTopicSpaceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedTopicSpaceInner.innerProperties = TopicSpaceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedTopicSpaceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTopicSpaceInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceProperties.java index 8ba3f8f9c652e..23a774d6a8d83 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceProperties.java @@ -5,35 +5,36 @@ 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.TopicSpaceProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties of topic space. */ @Fluent -public final class TopicSpaceProperties { +public final class TopicSpaceProperties implements JsonSerializable { /* * Description for the Topic Space resource. */ - @JsonProperty(value = "description") private String description; /* * The topic filters in the topic space. - * Example: "topicTemplates": [ - * "devices/foo/bar", - * "devices/topic1/+", - * "devices/${principal.name}/${principal.attributes.keyName}" ]. + * Example: "topicTemplates": [ + * "devices/foo/bar", + * "devices/topic1/+", + * "devices/${principal.name}/${principal.attributes.keyName}" ]. */ - @JsonProperty(value = "topicTemplates") private List topicTemplates; /* * Provisioning state of the TopicSpace resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private TopicSpaceProvisioningState provisioningState; /** @@ -106,4 +107,48 @@ public TopicSpaceProvisioningState provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeArrayField("topicTemplates", this.topicTemplates, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopicSpaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicSpaceProperties 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 TopicSpaceProperties. + */ + public static TopicSpaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicSpaceProperties deserializedTopicSpaceProperties = new TopicSpaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedTopicSpaceProperties.description = reader.getString(); + } else if ("topicTemplates".equals(fieldName)) { + List topicTemplates = reader.readArray(reader1 -> reader1.getString()); + deserializedTopicSpaceProperties.topicTemplates = topicTemplates; + } else if ("provisioningState".equals(fieldName)) { + deserializedTopicSpaceProperties.provisioningState + = TopicSpaceProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedTopicSpaceProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeInfoInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeInfoInner.java index dbe57cf44984d..6651b5258fc55 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeInfoInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeInfoInner.java @@ -6,11 +6,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; 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.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -21,9 +24,23 @@ public final class TopicTypeInfoInner extends ProxyResource { /* * Properties of the topic type info */ - @JsonProperty(value = "properties") private TopicTypeProperties innerProperties; + /* + * 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 TopicTypeInfoInner class. */ @@ -39,6 +56,36 @@ private TopicTypeProperties innerProperties() { return this.innerProperties; } + /** + * 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; + } + /** * Get the provider property: Namespace of the provider of the topic type. * @@ -284,4 +331,47 @@ public void validate() { 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 TopicTypeInfoInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicTypeInfoInner 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 TopicTypeInfoInner. + */ + public static TopicTypeInfoInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicTypeInfoInner deserializedTopicTypeInfoInner = new TopicTypeInfoInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTopicTypeInfoInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTopicTypeInfoInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTopicTypeInfoInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedTopicTypeInfoInner.innerProperties = TopicTypeProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTopicTypeInfoInner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeProperties.java index 2bf0e2034e653..30bb4fbaebd37 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeProperties.java @@ -5,76 +5,70 @@ 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.ResourceRegionType; import com.azure.resourcemanager.eventgrid.models.TopicTypeAdditionalEnforcedPermission; import com.azure.resourcemanager.eventgrid.models.TopicTypeProvisioningState; import com.azure.resourcemanager.eventgrid.models.TopicTypeSourceScope; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Properties of a topic type. */ @Fluent -public final class TopicTypeProperties { +public final class TopicTypeProperties implements JsonSerializable { /* * Namespace of the provider of the topic type. */ - @JsonProperty(value = "provider") private String provider; /* * Display Name for the topic type. */ - @JsonProperty(value = "displayName") private String displayName; /* * Description of the topic type. */ - @JsonProperty(value = "description") private String description; /* * Region type of the resource. */ - @JsonProperty(value = "resourceRegionType") private ResourceRegionType resourceRegionType; /* * Provisioning state of the topic type. */ - @JsonProperty(value = "provisioningState") private TopicTypeProvisioningState provisioningState; /* * List of locations supported by this topic type. */ - @JsonProperty(value = "supportedLocations") private List supportedLocations; /* * Source resource format. */ - @JsonProperty(value = "sourceResourceFormat") private String sourceResourceFormat; /* * Supported source scopes. */ - @JsonProperty(value = "supportedScopesForSource") private List supportedScopesForSource; /* * Flag to indicate that a topic type can support both regional or global system topics. */ - @JsonProperty(value = "areRegionalAndGlobalSourcesSupported") private Boolean areRegionalAndGlobalSourcesSupported; /* * Permissions which are enforced for creating and updating system topics of this this topic type. */ - @JsonProperty(value = "additionalEnforcedPermissions") private List additionalEnforcedPermissions; /** @@ -298,4 +292,80 @@ public void validate() { additionalEnforcedPermissions().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", this.provider); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("resourceRegionType", + this.resourceRegionType == null ? null : this.resourceRegionType.toString()); + jsonWriter.writeStringField("provisioningState", + this.provisioningState == null ? null : this.provisioningState.toString()); + jsonWriter.writeArrayField("supportedLocations", this.supportedLocations, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("sourceResourceFormat", this.sourceResourceFormat); + jsonWriter.writeArrayField("supportedScopesForSource", this.supportedScopesForSource, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeBooleanField("areRegionalAndGlobalSourcesSupported", this.areRegionalAndGlobalSourcesSupported); + jsonWriter.writeArrayField("additionalEnforcedPermissions", this.additionalEnforcedPermissions, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopicTypeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicTypeProperties 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 TopicTypeProperties. + */ + public static TopicTypeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicTypeProperties deserializedTopicTypeProperties = new TopicTypeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedTopicTypeProperties.provider = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedTopicTypeProperties.displayName = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedTopicTypeProperties.description = reader.getString(); + } else if ("resourceRegionType".equals(fieldName)) { + deserializedTopicTypeProperties.resourceRegionType + = ResourceRegionType.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedTopicTypeProperties.provisioningState + = TopicTypeProvisioningState.fromString(reader.getString()); + } else if ("supportedLocations".equals(fieldName)) { + List supportedLocations = reader.readArray(reader1 -> reader1.getString()); + deserializedTopicTypeProperties.supportedLocations = supportedLocations; + } else if ("sourceResourceFormat".equals(fieldName)) { + deserializedTopicTypeProperties.sourceResourceFormat = reader.getString(); + } else if ("supportedScopesForSource".equals(fieldName)) { + List supportedScopesForSource + = reader.readArray(reader1 -> TopicTypeSourceScope.fromString(reader1.getString())); + deserializedTopicTypeProperties.supportedScopesForSource = supportedScopesForSource; + } else if ("areRegionalAndGlobalSourcesSupported".equals(fieldName)) { + deserializedTopicTypeProperties.areRegionalAndGlobalSourcesSupported + = reader.getNullable(JsonReader::getBoolean); + } else if ("additionalEnforcedPermissions".equals(fieldName)) { + List additionalEnforcedPermissions + = reader.readArray(reader1 -> TopicTypeAdditionalEnforcedPermission.fromJson(reader1)); + deserializedTopicTypeProperties.additionalEnforcedPermissions = additionalEnforcedPermissions; + } else { + reader.skipChildren(); + } + } + + return deserializedTopicTypeProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicUpdateParameterProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicUpdateParameterProperties.java index 5bc571931a0d2..6a54b626fdd12 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicUpdateParameterProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicUpdateParameterProperties.java @@ -5,54 +5,56 @@ 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.DataResidencyBoundary; import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Information of topic update parameter properties. */ @Fluent -public final class TopicUpdateParameterProperties { +public final class TopicUpdateParameterProperties implements JsonSerializable { /* - * This determines if traffic is allowed over public network. By default it is enabled. - * You can further restrict to specific IPs by configuring + * This determines if traffic is allowed over public network. By default it is enabled. + * You can further restrict to specific IPs by configuring */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ - @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* * Minimum TLS version of the publisher allowed to publish to this domain */ - @JsonProperty(value = "minimumTlsVersionAllowed") private TlsVersion minimumTlsVersionAllowed; /* - * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the topic. + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the topic. */ - @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; /* * The data residency boundary for the topic. */ - @JsonProperty(value = "dataResidencyBoundary") private DataResidencyBoundary dataResidencyBoundary; /* * The eventTypeInfo for the topic. */ - @JsonProperty(value = "eventTypeInfo") private EventTypeInfo eventTypeInfo; /** @@ -210,4 +212,65 @@ public void validate() { eventTypeInfo().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeArrayField("inboundIpRules", this.inboundIpRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("minimumTlsVersionAllowed", + this.minimumTlsVersionAllowed == null ? null : this.minimumTlsVersionAllowed.toString()); + jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth); + jsonWriter.writeStringField("dataResidencyBoundary", + this.dataResidencyBoundary == null ? null : this.dataResidencyBoundary.toString()); + jsonWriter.writeJsonField("eventTypeInfo", this.eventTypeInfo); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopicUpdateParameterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicUpdateParameterProperties 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 TopicUpdateParameterProperties. + */ + public static TopicUpdateParameterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicUpdateParameterProperties deserializedTopicUpdateParameterProperties + = new TopicUpdateParameterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicNetworkAccess".equals(fieldName)) { + deserializedTopicUpdateParameterProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("inboundIpRules".equals(fieldName)) { + List inboundIpRules = reader.readArray(reader1 -> InboundIpRule.fromJson(reader1)); + deserializedTopicUpdateParameterProperties.inboundIpRules = inboundIpRules; + } else if ("minimumTlsVersionAllowed".equals(fieldName)) { + deserializedTopicUpdateParameterProperties.minimumTlsVersionAllowed + = TlsVersion.fromString(reader.getString()); + } else if ("disableLocalAuth".equals(fieldName)) { + deserializedTopicUpdateParameterProperties.disableLocalAuth + = reader.getNullable(JsonReader::getBoolean); + } else if ("dataResidencyBoundary".equals(fieldName)) { + deserializedTopicUpdateParameterProperties.dataResidencyBoundary + = DataResidencyBoundary.fromString(reader.getString()); + } else if ("eventTypeInfo".equals(fieldName)) { + deserializedTopicUpdateParameterProperties.eventTypeInfo = EventTypeInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTopicUpdateParameterProperties; + }); + } } 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 989e82da94dae..99f51f44df517 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 @@ -7,9 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.PartnerDetails; import com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.UUID; /** @@ -20,15 +23,28 @@ public final class VerifiedPartnerInner extends ProxyResource { /* * Properties of the verified partner. */ - @JsonProperty(value = "properties") private VerifiedPartnerProperties innerProperties; /* - * The system metadata relating to Verified Partner resource. + * The system metadata relating to the Event Grid resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 VerifiedPartnerInner class. */ @@ -45,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. */ @@ -53,6 +69,36 @@ 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; + } + /** * Get the partnerRegistrationImmutableId property: ImmutableId of the corresponding partner registration. * @@ -201,4 +247,49 @@ public void validate() { 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 VerifiedPartnerInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VerifiedPartnerInner 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 VerifiedPartnerInner. + */ + public static VerifiedPartnerInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VerifiedPartnerInner deserializedVerifiedPartnerInner = new VerifiedPartnerInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVerifiedPartnerInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVerifiedPartnerInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVerifiedPartnerInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVerifiedPartnerInner.innerProperties = VerifiedPartnerProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedVerifiedPartnerInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVerifiedPartnerInner; + }); + } } 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 8f4bb4a7b6a90..640e1839d2186 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 @@ -5,50 +5,49 @@ 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.PartnerDetails; import com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; +import java.util.Objects; import java.util.UUID; /** * Properties of the verified partner. */ @Fluent -public final class VerifiedPartnerProperties { +public final class VerifiedPartnerProperties implements JsonSerializable { /* * ImmutableId of the corresponding partner registration. */ - @JsonProperty(value = "partnerRegistrationImmutableId") private UUID partnerRegistrationImmutableId; /* * Official name of the Partner. */ - @JsonProperty(value = "organizationName") private String organizationName; /* * Display name of the verified partner. */ - @JsonProperty(value = "partnerDisplayName") private String partnerDisplayName; /* * Details of the partner topic scenario. */ - @JsonProperty(value = "partnerTopicDetails") private PartnerDetails partnerTopicDetails; /* * Details of the partner destination scenario. */ - @JsonProperty(value = "partnerDestinationDetails") private PartnerDetails partnerDestinationDetails; /* * Provisioning state of the verified partner. */ - @JsonProperty(value = "provisioningState") private VerifiedPartnerProvisioningState provisioningState; /** @@ -190,4 +189,59 @@ public void validate() { partnerDestinationDetails().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("partnerRegistrationImmutableId", + Objects.toString(this.partnerRegistrationImmutableId, null)); + jsonWriter.writeStringField("organizationName", this.organizationName); + jsonWriter.writeStringField("partnerDisplayName", this.partnerDisplayName); + jsonWriter.writeJsonField("partnerTopicDetails", this.partnerTopicDetails); + jsonWriter.writeJsonField("partnerDestinationDetails", this.partnerDestinationDetails); + jsonWriter.writeStringField("provisioningState", + this.provisioningState == null ? null : this.provisioningState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VerifiedPartnerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VerifiedPartnerProperties 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 VerifiedPartnerProperties. + */ + public static VerifiedPartnerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VerifiedPartnerProperties deserializedVerifiedPartnerProperties = new VerifiedPartnerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("partnerRegistrationImmutableId".equals(fieldName)) { + deserializedVerifiedPartnerProperties.partnerRegistrationImmutableId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("organizationName".equals(fieldName)) { + deserializedVerifiedPartnerProperties.organizationName = reader.getString(); + } else if ("partnerDisplayName".equals(fieldName)) { + deserializedVerifiedPartnerProperties.partnerDisplayName = reader.getString(); + } else if ("partnerTopicDetails".equals(fieldName)) { + deserializedVerifiedPartnerProperties.partnerTopicDetails = PartnerDetails.fromJson(reader); + } else if ("partnerDestinationDetails".equals(fieldName)) { + deserializedVerifiedPartnerProperties.partnerDestinationDetails = PartnerDetails.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedVerifiedPartnerProperties.provisioningState + = VerifiedPartnerProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVerifiedPartnerProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookEventSubscriptionDestinationProperties.java index b32e42b0c8daa..c9e2559a55ccb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookEventSubscriptionDestinationProperties.java @@ -5,62 +5,61 @@ 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.DeliveryAttributeMapping; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Information about the webhook destination properties for an event subscription. */ @Fluent -public final class WebhookEventSubscriptionDestinationProperties { +public final class WebhookEventSubscriptionDestinationProperties + implements JsonSerializable { /* * The URL that represents the endpoint of the destination of an event subscription. */ - @JsonProperty(value = "endpointUrl") private String endpointUrl; /* * The base URL that represents the endpoint of the destination of an event subscription. */ - @JsonProperty(value = "endpointBaseUrl", access = JsonProperty.Access.WRITE_ONLY) private String endpointBaseUrl; /* * Maximum number of events per batch. */ - @JsonProperty(value = "maxEventsPerBatch") private Integer maxEventsPerBatch; /* * Preferred batch size in Kilobytes. */ - @JsonProperty(value = "preferredBatchSizeInKilobytes") private Integer preferredBatchSizeInKilobytes; /* - * The Azure Active Directory Tenant ID to get the access token that will be included as the bearer token in delivery requests. + * The Azure Active Directory Tenant ID to get the access token that will be included as the bearer token in + * delivery requests. */ - @JsonProperty(value = "azureActiveDirectoryTenantId") private String azureActiveDirectoryTenantId; /* - * The Azure Active Directory Application ID or URI to get the access token that will be included as the bearer token in delivery requests. + * The Azure Active Directory Application ID or URI to get the access token that will be included as the bearer + * token in delivery requests. */ - @JsonProperty(value = "azureActiveDirectoryApplicationIdOrUri") private String azureActiveDirectoryApplicationIdOrUri; /* * Delivery attribute details. */ - @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; /* * Minimum TLS version that should be supported by webhook endpoint */ - @JsonProperty(value = "minimumTlsVersionAllowed") private TlsVersion minimumTlsVersionAllowed; /** @@ -238,4 +237,72 @@ public void validate() { deliveryAttributeMappings().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("endpointUrl", this.endpointUrl); + jsonWriter.writeNumberField("maxEventsPerBatch", this.maxEventsPerBatch); + jsonWriter.writeNumberField("preferredBatchSizeInKilobytes", this.preferredBatchSizeInKilobytes); + jsonWriter.writeStringField("azureActiveDirectoryTenantId", this.azureActiveDirectoryTenantId); + jsonWriter.writeStringField("azureActiveDirectoryApplicationIdOrUri", + this.azureActiveDirectoryApplicationIdOrUri); + jsonWriter.writeArrayField("deliveryAttributeMappings", this.deliveryAttributeMappings, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("minimumTlsVersionAllowed", + this.minimumTlsVersionAllowed == null ? null : this.minimumTlsVersionAllowed.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebhookEventSubscriptionDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebhookEventSubscriptionDestinationProperties 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 WebhookEventSubscriptionDestinationProperties. + */ + public static WebhookEventSubscriptionDestinationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebhookEventSubscriptionDestinationProperties deserializedWebhookEventSubscriptionDestinationProperties + = new WebhookEventSubscriptionDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointUrl".equals(fieldName)) { + deserializedWebhookEventSubscriptionDestinationProperties.endpointUrl = reader.getString(); + } else if ("endpointBaseUrl".equals(fieldName)) { + deserializedWebhookEventSubscriptionDestinationProperties.endpointBaseUrl = reader.getString(); + } else if ("maxEventsPerBatch".equals(fieldName)) { + deserializedWebhookEventSubscriptionDestinationProperties.maxEventsPerBatch + = reader.getNullable(JsonReader::getInt); + } else if ("preferredBatchSizeInKilobytes".equals(fieldName)) { + deserializedWebhookEventSubscriptionDestinationProperties.preferredBatchSizeInKilobytes + = reader.getNullable(JsonReader::getInt); + } else if ("azureActiveDirectoryTenantId".equals(fieldName)) { + deserializedWebhookEventSubscriptionDestinationProperties.azureActiveDirectoryTenantId + = reader.getString(); + } else if ("azureActiveDirectoryApplicationIdOrUri".equals(fieldName)) { + deserializedWebhookEventSubscriptionDestinationProperties.azureActiveDirectoryApplicationIdOrUri + = reader.getString(); + } else if ("deliveryAttributeMappings".equals(fieldName)) { + List deliveryAttributeMappings + = reader.readArray(reader1 -> DeliveryAttributeMapping.fromJson(reader1)); + deserializedWebhookEventSubscriptionDestinationProperties.deliveryAttributeMappings + = deliveryAttributeMappings; + } else if ("minimumTlsVersionAllowed".equals(fieldName)) { + deserializedWebhookEventSubscriptionDestinationProperties.minimumTlsVersionAllowed + = TlsVersion.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedWebhookEventSubscriptionDestinationProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookPartnerDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookPartnerDestinationProperties.java index 8ebc3474eeb06..f7043d296b17c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookPartnerDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookPartnerDestinationProperties.java @@ -5,30 +5,32 @@ 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.PartnerClientAuthentication; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Properties of a partner destination webhook. */ @Fluent -public final class WebhookPartnerDestinationProperties { +public final class WebhookPartnerDestinationProperties + implements JsonSerializable { /* * The URL that represents the endpoint of the partner destination. */ - @JsonProperty(value = "endpointUrl") private String endpointUrl; /* * The base URL that represents the endpoint of the partner destination. */ - @JsonProperty(value = "endpointBaseUrl") private String endpointBaseUrl; /* * Partner client authentication */ - @JsonProperty(value = "clientAuthentication") private PartnerClientAuthentication clientAuthentication; /** @@ -108,4 +110,48 @@ public void validate() { 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/CaCertificatesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesClientImpl.java index 9cb735613f81a..fb723a3c7694f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesClientImpl.java @@ -1002,9 +1002,7 @@ public PagedIterable listByNamespace(String resourceGroupNam /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1031,9 +1029,7 @@ private Mono> listByNamespaceNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsClientImpl.java index adfd2770545aa..6443805a58027 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsClientImpl.java @@ -36,8 +36,8 @@ import com.azure.resourcemanager.eventgrid.fluent.ChannelsClient; import com.azure.resourcemanager.eventgrid.fluent.models.ChannelInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner; -import com.azure.resourcemanager.eventgrid.models.ChannelsListResult; import com.azure.resourcemanager.eventgrid.models.ChannelUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.ChannelsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1220,9 +1220,7 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1250,9 +1248,7 @@ private Mono> listByPartnerNamespaceNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsImpl.java index 7d5e9a6af82cc..6062d81c5611f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsImpl.java @@ -13,8 +13,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.ChannelInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner; import com.azure.resourcemanager.eventgrid.models.Channel; -import com.azure.resourcemanager.eventgrid.models.Channels; import com.azure.resourcemanager.eventgrid.models.ChannelUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.Channels; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; public final class ChannelsImpl implements Channels { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsClientImpl.java index 18d4dd0d73b4c..b114e4481cc8c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsClientImpl.java @@ -999,9 +999,7 @@ public PagedIterable listByNamespace(String resourceGroupName, /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1028,9 +1026,7 @@ private Mono> listByNamespaceNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsClientImpl.java index fccd9dd785469..5b3f9d36281cc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsClientImpl.java @@ -983,9 +983,7 @@ public PagedIterable listByNamespace(String resourceGroupName, Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1012,9 +1010,7 @@ private Mono> listByNamespaceNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsClientImpl.java index dac56c97f154f..91997c78ecdb2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsClientImpl.java @@ -37,8 +37,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.DeliveryAttributeListResultInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1635,9 +1635,7 @@ public PagedIterable list(String resourceGroupName, Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1663,9 +1661,7 @@ private Mono> listNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. 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 81bc1a985ea25..86d12c1db3e66 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 @@ -37,8 +37,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.DeliveryAttributeListResultInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1749,9 +1749,7 @@ public PagedIterable list(String resourceGroupName, Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1777,9 +1775,7 @@ private Mono> listNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsClientImpl.java index d8dd48f3f4c5d..5b2f8850a68dd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsClientImpl.java @@ -964,9 +964,7 @@ public PagedIterable listByDomain(String resourceGroupName, St /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -993,9 +991,7 @@ private Mono> listByDomainNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsClientImpl.java index 1a916d974f5aa..58ac033d3c18c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsClientImpl.java @@ -37,8 +37,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.DomainInner; import com.azure.resourcemanager.eventgrid.fluent.models.DomainSharedAccessKeysInner; import com.azure.resourcemanager.eventgrid.models.DomainRegenerateKeyRequest; -import com.azure.resourcemanager.eventgrid.models.DomainsListResult; import com.azure.resourcemanager.eventgrid.models.DomainUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.DomainsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1674,9 +1674,7 @@ public DomainSharedAccessKeysInner regenerateKey(String resourceGroupName, Strin /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1704,9 +1702,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1733,9 +1729,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1763,9 +1757,7 @@ private Mono> listByResourceGroupNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsImpl.java index c0aae518d2002..9cadd6738bd78 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsImpl.java @@ -14,8 +14,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.DomainSharedAccessKeysInner; import com.azure.resourcemanager.eventgrid.models.Domain; import com.azure.resourcemanager.eventgrid.models.DomainRegenerateKeyRequest; -import com.azure.resourcemanager.eventgrid.models.Domains; import com.azure.resourcemanager.eventgrid.models.DomainSharedAccessKeys; +import com.azure.resourcemanager.eventgrid.models.Domains; public final class DomainsImpl implements Domains { private static final ClientLogger LOGGER = new ClientLogger(DomainsImpl.class); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientBuilder.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientBuilder.java index f3c4915cc17c3..6e1e8d2e21244 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientBuilder.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientBuilder.java @@ -20,7 +20,8 @@ @ServiceClientBuilder(serviceClients = { EventGridManagementClientImpl.class }) public final class EventGridManagementClientBuilder { /* - * Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. */ private String subscriptionId; 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 0eb87b256c4bd..c49f67187d6c1 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 @@ -13,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollerFactory; import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -28,15 +28,15 @@ import com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient; import com.azure.resourcemanager.eventgrid.fluent.ClientsClient; import com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient; -import com.azure.resourcemanager.eventgrid.fluent.DomainsClient; import com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient; import com.azure.resourcemanager.eventgrid.fluent.DomainTopicsClient; +import com.azure.resourcemanager.eventgrid.fluent.DomainsClient; import com.azure.resourcemanager.eventgrid.fluent.EventGridManagementClient; import com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient; import com.azure.resourcemanager.eventgrid.fluent.ExtensionTopicsClient; -import com.azure.resourcemanager.eventgrid.fluent.NamespacesClient; 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; @@ -51,9 +51,9 @@ import com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient; import com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient; import com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient; -import com.azure.resourcemanager.eventgrid.fluent.TopicsClient; import com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient; import com.azure.resourcemanager.eventgrid.fluent.TopicTypesClient; +import com.azure.resourcemanager.eventgrid.fluent.TopicsClient; import com.azure.resourcemanager.eventgrid.fluent.VerifiedPartnersClient; import java.io.IOException; import java.lang.reflect.Type; @@ -607,7 +607,7 @@ public VerifiedPartnersClient getVerifiedPartners() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-06-01-preview"; + this.apiVersion = "2024-12-15-preview"; this.caCertificates = new CaCertificatesClientImpl(this); this.channels = new ChannelsClientImpl(this); this.clientGroups = new ClientGroupsClientImpl(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 0d69608409a92..08f7b7edb4ff1 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 @@ -37,8 +37,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.DeliveryAttributeListResultInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -3881,9 +3881,7 @@ public PagedIterable listByDomainTopic(String resourceGr /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -3911,9 +3909,7 @@ private Mono> listGlobalBySubscriptionNext /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -3941,9 +3937,7 @@ private Mono> listGlobalBySubscriptionNext /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -3972,9 +3966,7 @@ private Mono> listGlobalBySubscriptionNext /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4002,9 +3994,7 @@ private Mono> listGlobalBySubscriptionNext /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4032,9 +4022,7 @@ private Mono> listGlobalByResourceGroupNex /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4062,9 +4050,7 @@ private Mono> listGlobalByResourceGroupNex /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4093,9 +4079,7 @@ private Mono> listGlobalByResourceGroupNex /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4123,9 +4107,7 @@ private Mono> listGlobalByResourceGroupNex /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4153,9 +4135,7 @@ private Mono> listRegionalBySubscriptionNe /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4183,9 +4163,7 @@ private Mono> listRegionalBySubscriptionNe /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4213,9 +4191,7 @@ private Mono> listRegionalBySubscriptionNe /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4243,9 +4219,7 @@ private Mono> listRegionalByResourceGroupN /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4274,9 +4248,7 @@ private Mono> listRegionalByResourceGroupN /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4304,9 +4276,7 @@ private Mono> listRegionalByResourceGroupN /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4335,9 +4305,7 @@ private Mono> listRegionalByResourceGroupN /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4365,9 +4333,7 @@ private Mono> listRegionalByResourceGroupN /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4394,9 +4360,7 @@ private Mono> listByResourceNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4424,9 +4388,7 @@ private Mono> listByResourceNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -4453,9 +4415,7 @@ private Mono> listByDomainTopicNextSingleP /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. 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 091d896aedee0..c79d5d0b1b67c 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 @@ -16,8 +16,8 @@ import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeListResult; import com.azure.resourcemanager.eventgrid.models.EventSubscription; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptions; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.EventSubscriptions; public final class EventSubscriptionsImpl implements EventSubscriptions { private static final ClientLogger LOGGER = new ClientLogger(EventSubscriptionsImpl.class); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceImpl.java index 2e92e57a2ee1a..4406d0c81de4f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceImpl.java @@ -22,10 +22,10 @@ import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnection; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; -import com.azure.resourcemanager.eventgrid.models.UpdateTopicsConfigurationInfo; +import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; import com.azure.resourcemanager.eventgrid.models.UpdateTopicSpacesConfigurationInfo; +import com.azure.resourcemanager.eventgrid.models.UpdateTopicsConfigurationInfo; import java.util.Collections; import java.util.List; import java.util.Map; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsClientImpl.java index ee635c70bdf13..3cf6c1a04a621 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsClientImpl.java @@ -37,8 +37,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.DeliveryAttributeListResultInner; import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionFullUrlInner; import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner; -import com.azure.resourcemanager.eventgrid.models.SubscriptionsListResult; import com.azure.resourcemanager.eventgrid.models.SubscriptionUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.SubscriptionsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1774,9 +1774,7 @@ public SubscriptionFullUrlInner getFullUrl(String resourceGroupName, String name /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1804,9 +1802,7 @@ private Mono> listByNamespaceTopicNextSinglePag /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsClientImpl.java index ace590003b162..42f7904ee323b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsClientImpl.java @@ -36,8 +36,8 @@ import com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient; import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner; import com.azure.resourcemanager.eventgrid.fluent.models.TopicSharedAccessKeysInner; -import com.azure.resourcemanager.eventgrid.models.NamespaceTopicsListResult; import com.azure.resourcemanager.eventgrid.models.NamespaceTopicUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopicsListResult; import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -1724,9 +1724,7 @@ public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1753,9 +1751,7 @@ private Mono> listByNamespaceNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesClientImpl.java index 9d3c0d7046078..e2d62c25b4acc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesClientImpl.java @@ -38,8 +38,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner; import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceSharedAccessKeysInner; import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; -import com.azure.resourcemanager.eventgrid.models.NamespacesListResult; import com.azure.resourcemanager.eventgrid.models.NamespaceUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.NamespacesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -2045,9 +2045,7 @@ public CustomDomainOwnershipValidationResultInner validateCustomDomainOwnership( /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -2075,9 +2073,7 @@ private Mono> listBySubscriptionNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -2105,9 +2101,7 @@ private Mono> listBySubscriptionNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -2135,9 +2129,7 @@ private Mono> listByResourceGroupNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesImpl.java index 73df5e3561659..1bd705cfd0f4e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesImpl.java @@ -16,8 +16,8 @@ import com.azure.resourcemanager.eventgrid.models.CustomDomainOwnershipValidationResult; import com.azure.resourcemanager.eventgrid.models.Namespace; import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; -import com.azure.resourcemanager.eventgrid.models.Namespaces; import com.azure.resourcemanager.eventgrid.models.NamespaceSharedAccessKeys; +import com.azure.resourcemanager.eventgrid.models.Namespaces; public final class NamespacesImpl implements Namespaces { private static final ClientLogger LOGGER = new ClientLogger(NamespacesImpl.class); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsClientImpl.java index b720c73e616a0..edc0bcad9c058 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsClientImpl.java @@ -36,8 +36,8 @@ import com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationInner; import com.azure.resourcemanager.eventgrid.models.Partner; -import com.azure.resourcemanager.eventgrid.models.PartnerConfigurationsListResult; import com.azure.resourcemanager.eventgrid.models.PartnerConfigurationUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.PartnerConfigurationsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1535,9 +1535,7 @@ public PartnerConfigurationInner unauthorizePartner(String resourceGroupName, Pa /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1565,9 +1563,7 @@ private Mono> listBySubscriptionNextSin /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsImpl.java index a3657305c4e37..3d0fc6d568870 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsImpl.java @@ -13,8 +13,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationInner; import com.azure.resourcemanager.eventgrid.models.Partner; import com.azure.resourcemanager.eventgrid.models.PartnerConfiguration; -import com.azure.resourcemanager.eventgrid.models.PartnerConfigurations; import com.azure.resourcemanager.eventgrid.models.PartnerConfigurationUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.PartnerConfigurations; public final class PartnerConfigurationsImpl implements PartnerConfigurations { private static final ClientLogger LOGGER = new ClientLogger(PartnerConfigurationsImpl.class); 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 index 41b8999e1e499..55283ae61a98b 100644 --- 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 @@ -35,8 +35,8 @@ 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.PartnerDestinationsListResult; 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; @@ -1561,9 +1561,7 @@ public PartnerDestinationInner activate(String resourceGroupName, String partner /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1591,9 +1589,7 @@ private Mono> listBySubscriptionNextSingl /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1621,9 +1617,7 @@ private Mono> listBySubscriptionNextSingl /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1651,9 +1645,7 @@ private Mono> listByResourceGroupNextSing /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesClientImpl.java index fd2d800f75583..c2315f9ca0719 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesClientImpl.java @@ -37,8 +37,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceInner; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceSharedAccessKeysInner; import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceRegenerateKeyRequest; -import com.azure.resourcemanager.eventgrid.models.PartnerNamespacesListResult; import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.PartnerNamespacesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1731,9 +1731,7 @@ public PartnerNamespaceSharedAccessKeysInner regenerateKey(String resourceGroupN /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1761,9 +1759,7 @@ private Mono> listBySubscriptionNextSingleP /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1791,9 +1787,7 @@ private Mono> listBySubscriptionNextSingleP /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1821,9 +1815,7 @@ private Mono> listByResourceGroupNextSingle /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesImpl.java index c73f5c566f5be..50a85db236b3c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesImpl.java @@ -14,8 +14,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceSharedAccessKeysInner; import com.azure.resourcemanager.eventgrid.models.PartnerNamespace; import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceRegenerateKeyRequest; -import com.azure.resourcemanager.eventgrid.models.PartnerNamespaces; import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceSharedAccessKeys; +import com.azure.resourcemanager.eventgrid.models.PartnerNamespaces; public final class PartnerNamespacesImpl implements PartnerNamespaces { private static final ClientLogger LOGGER = new ClientLogger(PartnerNamespacesImpl.class); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsClientImpl.java index 91984370d38be..422799e7c01da 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsClientImpl.java @@ -34,8 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerRegistrationInner; -import com.azure.resourcemanager.eventgrid.models.PartnerRegistrationsListResult; import com.azure.resourcemanager.eventgrid.models.PartnerRegistrationUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.PartnerRegistrationsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1424,9 +1424,7 @@ public PagedIterable listByResourceGroup(String resour /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1454,9 +1452,7 @@ private Mono> listBySubscriptionNextSing /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1484,9 +1480,7 @@ private Mono> listBySubscriptionNextSing /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1514,9 +1508,7 @@ private Mono> listByResourceGroupNextSin /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsClientImpl.java index dd8f16b0abb97..d121faab5b090 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsClientImpl.java @@ -37,8 +37,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.DeliveryAttributeListResultInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1681,9 +1681,7 @@ public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGro /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1711,9 +1709,7 @@ private Mono> listByPartnerTopicNextSingle /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsClientImpl.java index f92aa95603d17..e24e2eecc48a0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsClientImpl.java @@ -35,8 +35,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerTopicInner; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicsListResult; import com.azure.resourcemanager.eventgrid.models.PartnerTopicUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.PartnerTopicsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1467,9 +1467,7 @@ public PartnerTopicInner deactivate(String resourceGroupName, String partnerTopi /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1497,9 +1495,7 @@ private Mono> listBySubscriptionNextSinglePageA /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1527,9 +1523,7 @@ private Mono> listBySubscriptionNextSinglePageA /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1557,9 +1551,7 @@ private Mono> listByResourceGroupNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsClientImpl.java index 89e21d07e1a51..debc595aab404 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsClientImpl.java @@ -1010,9 +1010,7 @@ public PagedIterable listByNamespace(String resourceGrou /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1039,9 +1037,7 @@ private Mono> listByNamespaceNextSinglePag /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsClientImpl.java index 9a581ab7970f0..bec13e6eb6ac3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsClientImpl.java @@ -1179,9 +1179,7 @@ public PagedIterable listByResource(String resou /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1208,9 +1206,7 @@ private Mono> listByResourceNextSi /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesClientImpl.java index e02900f765c09..91f874b161d6e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesClientImpl.java @@ -516,9 +516,7 @@ public PagedIterable listByResource(String resourceGro /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -545,9 +543,7 @@ private Mono> listByResourceNextSinglePa /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionImpl.java index 604db4a34c0d4..14ea2c1c7f61e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionImpl.java @@ -17,6 +17,8 @@ import com.azure.resourcemanager.eventgrid.models.SubscriptionProvisioningState; import com.azure.resourcemanager.eventgrid.models.SubscriptionUpdateParameters; import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; public final class SubscriptionImpl implements Subscription, Subscription.Definition, Subscription.Update { private SubscriptionInner innerObject; @@ -59,6 +61,15 @@ public OffsetDateTime expirationTimeUtc() { return this.innerModel().expirationTimeUtc(); } + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + public String resourceGroupName() { return resourceGroupName; } @@ -178,6 +189,16 @@ public SubscriptionFullUrl getFullUrl() { .getFullUrl(resourceGroupName, namespaceName, topicName, eventSubscriptionName); } + public SubscriptionImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateEventSubscriptionUpdateParameters.withTags(tags); + return this; + } + } + public SubscriptionImpl withDeliveryConfiguration(DeliveryConfiguration deliveryConfiguration) { if (isInCreateMode()) { this.innerModel().withDeliveryConfiguration(deliveryConfiguration); 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 b86c922450336..c9c29e288d8d2 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 @@ -37,8 +37,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.DeliveryAttributeListResultInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1674,9 +1674,7 @@ public PagedIterable listBySystemTopic(String resourceGr /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1703,9 +1701,7 @@ private Mono> listBySystemTopicNextSingleP /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsClientImpl.java index 4760304908a52..d275cf0999996 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsClientImpl.java @@ -34,8 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient; import com.azure.resourcemanager.eventgrid.fluent.models.SystemTopicInner; -import com.azure.resourcemanager.eventgrid.models.SystemTopicsListResult; import com.azure.resourcemanager.eventgrid.models.SystemTopicUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.SystemTopicsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1395,9 +1395,7 @@ public PagedIterable listByResourceGroup(String resourceGroupN /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1425,9 +1423,7 @@ private Mono> listBySubscriptionNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1455,9 +1451,7 @@ private Mono> listBySubscriptionNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1485,9 +1479,7 @@ private Mono> listByResourceGroupNextSinglePageA /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsClientImpl.java index ba5169a07b388..d0679612207a4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsClientImpl.java @@ -37,8 +37,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.DeliveryAttributeListResultInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1633,9 +1633,7 @@ public PagedIterable list(String resourceGroupName, Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1661,9 +1659,7 @@ private Mono> listNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesClientImpl.java index 85eef75330c5c..caa4abb2cba2e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesClientImpl.java @@ -989,9 +989,7 @@ public PagedIterable listByNamespace(String resourceGroupName, /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1018,9 +1016,7 @@ private Mono> listByNamespaceNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsClientImpl.java index 1535d0cae9a3c..b8fef8f819c7e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsClientImpl.java @@ -39,8 +39,8 @@ import com.azure.resourcemanager.eventgrid.fluent.models.TopicSharedAccessKeysInner; import com.azure.resourcemanager.eventgrid.models.EventTypesListResult; import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; -import com.azure.resourcemanager.eventgrid.models.TopicsListResult; import com.azure.resourcemanager.eventgrid.models.TopicUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.TopicsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1980,9 +1980,7 @@ public PagedIterable listEventTypes(String resourceGroupName, St /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -2010,9 +2008,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -2039,9 +2035,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -2069,9 +2063,7 @@ private Mono> listByResourceGroupNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsImpl.java index 49bb2d04d9242..605c13aaf7fbc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsImpl.java @@ -16,8 +16,8 @@ import com.azure.resourcemanager.eventgrid.models.EventType; import com.azure.resourcemanager.eventgrid.models.Topic; import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; -import com.azure.resourcemanager.eventgrid.models.Topics; import com.azure.resourcemanager.eventgrid.models.TopicSharedAccessKeys; +import com.azure.resourcemanager.eventgrid.models.Topics; public final class TopicsImpl implements Topics { private static final ClientLogger LOGGER = new ClientLogger(TopicsImpl.class); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersClientImpl.java index 12e370338fdfa..9e9dfde50396d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersClientImpl.java @@ -361,9 +361,7 @@ public PagedIterable list(String filter, Integer top, Cont /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -389,9 +387,7 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilter.java index 932d16d1a15fc..73ca9410fb635 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilter.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * This is the base type that represents an advanced filter. To configure an advanced filter, do not directly @@ -17,48 +17,22 @@ * BoolEqualsAdvancedFilter, NumberInAdvancedFilter, StringEqualsAdvancedFilter etc. depending on the type of the key * based on which you want to filter. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "operatorType", defaultImpl = AdvancedFilter.class, visible = true) -@JsonTypeName("AdvancedFilter") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "NumberIn", value = NumberInAdvancedFilter.class), - @JsonSubTypes.Type(name = "NumberNotIn", value = NumberNotInAdvancedFilter.class), - @JsonSubTypes.Type(name = "NumberLessThan", value = NumberLessThanAdvancedFilter.class), - @JsonSubTypes.Type(name = "NumberGreaterThan", value = NumberGreaterThanAdvancedFilter.class), - @JsonSubTypes.Type(name = "NumberLessThanOrEquals", value = NumberLessThanOrEqualsAdvancedFilter.class), - @JsonSubTypes.Type(name = "NumberGreaterThanOrEquals", value = NumberGreaterThanOrEqualsAdvancedFilter.class), - @JsonSubTypes.Type(name = "BoolEquals", value = BoolEqualsAdvancedFilter.class), - @JsonSubTypes.Type(name = "StringIn", value = StringInAdvancedFilter.class), - @JsonSubTypes.Type(name = "StringNotIn", value = StringNotInAdvancedFilter.class), - @JsonSubTypes.Type(name = "StringBeginsWith", value = StringBeginsWithAdvancedFilter.class), - @JsonSubTypes.Type(name = "StringEndsWith", value = StringEndsWithAdvancedFilter.class), - @JsonSubTypes.Type(name = "StringContains", value = StringContainsAdvancedFilter.class), - @JsonSubTypes.Type(name = "NumberInRange", value = NumberInRangeAdvancedFilter.class), - @JsonSubTypes.Type(name = "NumberNotInRange", value = NumberNotInRangeAdvancedFilter.class), - @JsonSubTypes.Type(name = "StringNotBeginsWith", value = StringNotBeginsWithAdvancedFilter.class), - @JsonSubTypes.Type(name = "StringNotEndsWith", value = StringNotEndsWithAdvancedFilter.class), - @JsonSubTypes.Type(name = "StringNotContains", value = StringNotContainsAdvancedFilter.class), - @JsonSubTypes.Type(name = "IsNullOrUndefined", value = IsNullOrUndefinedAdvancedFilter.class), - @JsonSubTypes.Type(name = "IsNotNull", value = IsNotNullAdvancedFilter.class) }) @Fluent -public class AdvancedFilter { +public class AdvancedFilter implements JsonSerializable { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) - private AdvancedFilterOperatorType operatorType; + private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.fromString("AdvancedFilter"); /* * The field/property in the event based on which you want to filter. */ - @JsonProperty(value = "key") private String key; /** * Creates an instance of AdvancedFilter class. */ public AdvancedFilter() { - this.operatorType = AdvancedFilterOperatorType.fromString("AdvancedFilter"); } /** @@ -98,4 +72,104 @@ public AdvancedFilter withKey(String key) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeStringField("key", this.key); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvancedFilter 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 AdvancedFilter. + */ + public static AdvancedFilter 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 ("operatorType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("NumberIn".equals(discriminatorValue)) { + return NumberInAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("NumberNotIn".equals(discriminatorValue)) { + return NumberNotInAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("NumberLessThan".equals(discriminatorValue)) { + return NumberLessThanAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("NumberGreaterThan".equals(discriminatorValue)) { + return NumberGreaterThanAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("NumberLessThanOrEquals".equals(discriminatorValue)) { + return NumberLessThanOrEqualsAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("NumberGreaterThanOrEquals".equals(discriminatorValue)) { + return NumberGreaterThanOrEqualsAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("BoolEquals".equals(discriminatorValue)) { + return BoolEqualsAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("StringIn".equals(discriminatorValue)) { + return StringInAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("StringNotIn".equals(discriminatorValue)) { + return StringNotInAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("StringBeginsWith".equals(discriminatorValue)) { + return StringBeginsWithAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("StringEndsWith".equals(discriminatorValue)) { + return StringEndsWithAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("StringContains".equals(discriminatorValue)) { + return StringContainsAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("NumberInRange".equals(discriminatorValue)) { + return NumberInRangeAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("NumberNotInRange".equals(discriminatorValue)) { + return NumberNotInRangeAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("StringNotBeginsWith".equals(discriminatorValue)) { + return StringNotBeginsWithAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("StringNotEndsWith".equals(discriminatorValue)) { + return StringNotEndsWithAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("StringNotContains".equals(discriminatorValue)) { + return StringNotContainsAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("IsNullOrUndefined".equals(discriminatorValue)) { + return IsNullOrUndefinedAdvancedFilter.fromJson(readerToUse.reset()); + } else if ("IsNotNull".equals(discriminatorValue)) { + return IsNotNullAdvancedFilter.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static AdvancedFilter fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvancedFilter deserializedAdvancedFilter = new AdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operatorType".equals(fieldName)) { + deserializedAdvancedFilter.operatorType = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("key".equals(fieldName)) { + deserializedAdvancedFilter.key = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvancedFilter; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilterOperatorType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilterOperatorType.java index c604f4af6a0a8..0792d66252c62 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilterOperatorType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilterOperatorType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -123,7 +122,6 @@ public AdvancedFilterOperatorType() { * @param name a name to look for. * @return the corresponding AdvancedFilterOperatorType. */ - @JsonCreator public static AdvancedFilterOperatorType fromString(String name) { return fromString(name, AdvancedFilterOperatorType.class); } 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 index c23d19b7d6c73..fc53c6536c89f 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -55,7 +54,6 @@ public AlternativeAuthenticationNameSource() { * @param name a name to look for. * @return the corresponding AlternativeAuthenticationNameSource. */ - @JsonCreator public static AlternativeAuthenticationNameSource fromString(String name) { return fromString(name, 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 index 0b4de82ec64c3..090089a750584 100644 --- 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 @@ -5,34 +5,25 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; /** * Azure Active Directory Partner Client Authentication. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "clientAuthenticationType", - defaultImpl = AzureADPartnerClientAuthentication.class, - visible = true) -@JsonTypeName("AzureAD") @Fluent public final class AzureADPartnerClientAuthentication extends PartnerClientAuthentication { /* * Type of client authentication */ - @JsonTypeId - @JsonProperty(value = "clientAuthenticationType", required = true) private PartnerClientAuthenticationType clientAuthenticationType = PartnerClientAuthenticationType.AZURE_AD; /* * AzureAD ClientAuthentication Properties */ - @JsonProperty(value = "properties") private AzureADPartnerClientAuthenticationProperties innerProperties; /** @@ -118,9 +109,51 @@ public String azureActiveDirectoryApplicationIdOrUri() { */ @Override public void validate() { - super.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/AzureFunctionEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureFunctionEventSubscriptionDestination.java index 769c08ab271cf..492d335f46f75 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureFunctionEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureFunctionEventSubscriptionDestination.java @@ -5,35 +5,26 @@ 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.AzureFunctionEventSubscriptionDestinationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; import java.util.List; /** * Information about the azure function destination for an event subscription. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = AzureFunctionEventSubscriptionDestination.class, - visible = true) -@JsonTypeName("AzureFunction") @Fluent public final class AzureFunctionEventSubscriptionDestination extends EventSubscriptionDestination { /* * Type of the endpoint for the event subscription destination. */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private EndpointType endpointType = EndpointType.AZURE_FUNCTION; /* * Azure Function Properties of the event subscription destination. */ - @JsonProperty(value = "properties") private AzureFunctionEventSubscriptionDestinationProperties innerProperties; /** @@ -164,9 +155,50 @@ public List deliveryAttributeMappings() { */ @Override public void validate() { - super.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 AzureFunctionEventSubscriptionDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureFunctionEventSubscriptionDestination 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 AzureFunctionEventSubscriptionDestination. + */ + public static AzureFunctionEventSubscriptionDestination fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureFunctionEventSubscriptionDestination deserializedAzureFunctionEventSubscriptionDestination + = new AzureFunctionEventSubscriptionDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedAzureFunctionEventSubscriptionDestination.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedAzureFunctionEventSubscriptionDestination.innerProperties + = AzureFunctionEventSubscriptionDestinationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureFunctionEventSubscriptionDestination; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsAdvancedFilter.java index 2dc8f613a2bcb..b3db2ab7d8dff 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsAdvancedFilter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * BoolEquals Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = BoolEqualsAdvancedFilter.class, - visible = true) -@JsonTypeName("BoolEquals") @Fluent public final class BoolEqualsAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.BOOL_EQUALS; /* * The boolean filter value. */ - @JsonProperty(value = "value") private Boolean value; /** @@ -87,6 +78,48 @@ public BoolEqualsAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeBooleanField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BoolEqualsAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BoolEqualsAdvancedFilter 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 BoolEqualsAdvancedFilter. + */ + public static BoolEqualsAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BoolEqualsAdvancedFilter deserializedBoolEqualsAdvancedFilter = new BoolEqualsAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedBoolEqualsAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedBoolEqualsAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedBoolEqualsAdvancedFilter.value = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedBoolEqualsAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsFilter.java index fdb9c3ace3d4c..83cfe834e319b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsFilter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * BoolEquals Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = BoolEqualsFilter.class, - visible = true) -@JsonTypeName("BoolEquals") @Fluent public final class BoolEqualsFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.BOOL_EQUALS; /* * The boolean filter value. */ - @JsonProperty(value = "value") private Boolean value; /** @@ -87,6 +78,47 @@ public BoolEqualsFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeBooleanField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BoolEqualsFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BoolEqualsFilter 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 BoolEqualsFilter. + */ + public static BoolEqualsFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BoolEqualsFilter deserializedBoolEqualsFilter = new BoolEqualsFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedBoolEqualsFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedBoolEqualsFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedBoolEqualsFilter.value = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedBoolEqualsFilter; + }); } } 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 f88ea170c189f..8c8fcd9156c1f 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/CaCertificateProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificateProvisioningState.java index b68380c133a04..aa079caa7e340 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificateProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificateProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -62,7 +61,6 @@ public CaCertificateProvisioningState() { * @param name a name to look for. * @return the corresponding CaCertificateProvisioningState. */ - @JsonCreator public static CaCertificateProvisioningState fromString(String name) { return fromString(name, CaCertificateProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificatesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificatesListResult.java index 6431055dcaa8c..9c73b151fd612 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificatesListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificatesListResult.java @@ -5,25 +5,27 @@ 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.CaCertificateInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List CA Certificate operation. */ @Fluent -public final class CaCertificatesListResult { +public final class CaCertificatesListResult implements JsonSerializable { /* * A collection of CA Certificate. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of CA Certificate. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 CaCertificatesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CaCertificatesListResult 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 CaCertificatesListResult. + */ + public static CaCertificatesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CaCertificatesListResult deserializedCaCertificatesListResult = new CaCertificatesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> CaCertificateInner.fromJson(reader1)); + deserializedCaCertificatesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedCaCertificatesListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCaCertificatesListResult; + }); + } } 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 4315166e43710..d62313522f459 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. */ 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 1c512634c8645..d26c465ef4498 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -69,7 +68,6 @@ public ChannelProvisioningState() { * @param name a name to look for. * @return the corresponding ChannelProvisioningState. */ - @JsonCreator public static ChannelProvisioningState fromString(String name) { return fromString(name, ChannelProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelType.java index b6c7aa9608f3e..3388de345ddb9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public ChannelType() { * @param name a name to look for. * @return the corresponding ChannelType. */ - @JsonCreator public static ChannelType fromString(String name) { return fromString(name, ChannelType.class); } 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 55ae8b3bcd849..bf423d3be6494 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 @@ -5,19 +5,22 @@ 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.ChannelUpdateParametersProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** * Properties of the Channel update. */ @Fluent -public final class ChannelUpdateParameters { +public final class ChannelUpdateParameters implements JsonSerializable { /* * Properties of the channel update parameters. */ - @JsonProperty(value = "properties") private ChannelUpdateParametersProperties innerProperties; /** @@ -122,4 +125,41 @@ public void validate() { 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 ChannelUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChannelUpdateParameters 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 ChannelUpdateParameters. + */ + public static ChannelUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChannelUpdateParameters deserializedChannelUpdateParameters = new ChannelUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedChannelUpdateParameters.innerProperties + = ChannelUpdateParametersProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedChannelUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelsListResult.java index 6e821eb1c20f4..39be656f48bac 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelsListResult.java @@ -5,25 +5,27 @@ 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.ChannelInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Channels operation. */ @Fluent -public final class ChannelsListResult { +public final class ChannelsListResult implements JsonSerializable { /* * A collection of Channels. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of channels. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 ChannelsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChannelsListResult 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 ChannelsListResult. + */ + public static ChannelsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChannelsListResult deserializedChannelsListResult = new ChannelsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ChannelInner.fromJson(reader1)); + deserializedChannelsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedChannelsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedChannelsListResult; + }); + } } 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 49fe70227a526..b97f92b8dd818 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 index 22b476bfc846b..6285e069c2e87 100644 --- 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 @@ -5,24 +5,26 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class ClientAuthenticationSettings implements JsonSerializable { /* * Alternative authentication name sources related to client authentication settings for namespace resource. */ - @JsonProperty(value = "alternativeAuthenticationNameSources") private List alternativeAuthenticationNameSources; /* * Custom JWT authentication settings for namespace resource. */ - @JsonProperty(value = "customJwtAuthentication") private CustomJwtAuthenticationSettings customJwtAuthentication; /** @@ -85,4 +87,48 @@ public void validate() { 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/ClientCertificateAuthentication.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateAuthentication.java index 21d9ac37ea80c..80ecfa7b263c2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateAuthentication.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateAuthentication.java @@ -5,24 +5,27 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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; /** * The certificate authentication properties for the client. */ @Fluent -public final class ClientCertificateAuthentication { +public final class ClientCertificateAuthentication implements JsonSerializable { /* * The validation scheme used to authenticate the client. Default value is SubjectMatchesAuthenticationName. */ - @JsonProperty(value = "validationScheme") private ClientCertificateValidationScheme validationScheme; /* - * The list of thumbprints that are allowed during client authentication. This property is required only if the validationScheme is 'ThumbprintMatch'. + * The list of thumbprints that are allowed during client authentication. This property is required only if the + * validationScheme is 'ThumbprintMatch'. */ - @JsonProperty(value = "allowedThumbprints") private List allowedThumbprints; /** @@ -82,4 +85,48 @@ public ClientCertificateAuthentication withAllowedThumbprints(List allow */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("validationScheme", + this.validationScheme == null ? null : this.validationScheme.toString()); + jsonWriter.writeArrayField("allowedThumbprints", this.allowedThumbprints, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClientCertificateAuthentication from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClientCertificateAuthentication 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 ClientCertificateAuthentication. + */ + public static ClientCertificateAuthentication fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClientCertificateAuthentication deserializedClientCertificateAuthentication + = new ClientCertificateAuthentication(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("validationScheme".equals(fieldName)) { + deserializedClientCertificateAuthentication.validationScheme + = ClientCertificateValidationScheme.fromString(reader.getString()); + } else if ("allowedThumbprints".equals(fieldName)) { + List allowedThumbprints = reader.readArray(reader1 -> reader1.getString()); + deserializedClientCertificateAuthentication.allowedThumbprints = allowedThumbprints; + } else { + reader.skipChildren(); + } + } + + return deserializedClientCertificateAuthentication; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateValidationScheme.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateValidationScheme.java index 5d2742ed9335f..b39cf9f8ba785 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateValidationScheme.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateValidationScheme.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -62,7 +61,6 @@ public ClientCertificateValidationScheme() { * @param name a name to look for. * @return the corresponding ClientCertificateValidationScheme. */ - @JsonCreator public static ClientCertificateValidationScheme fromString(String name) { return fromString(name, ClientCertificateValidationScheme.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroup.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroup.java index 19f6c9c5303d4..3b0cbe403b839 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/ClientGroupProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupProvisioningState.java index b9288a07e45c3..518a2b1795b20 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -62,7 +61,6 @@ public ClientGroupProvisioningState() { * @param name a name to look for. * @return the corresponding ClientGroupProvisioningState. */ - @JsonCreator public static ClientGroupProvisioningState fromString(String name) { return fromString(name, ClientGroupProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupsListResult.java index a7a745e089b48..dc3987f460418 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupsListResult.java @@ -5,25 +5,27 @@ 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.ClientGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Client Group operation. */ @Fluent -public final class ClientGroupsListResult { +public final class ClientGroupsListResult implements JsonSerializable { /* * A collection of Client Group. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of Client Group. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 ClientGroupsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClientGroupsListResult 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 ClientGroupsListResult. + */ + public static ClientGroupsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClientGroupsListResult deserializedClientGroupsListResult = new ClientGroupsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ClientGroupInner.fromJson(reader1)); + deserializedClientGroupsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedClientGroupsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedClientGroupsListResult; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientProvisioningState.java index 73cf71e6cec5f..3189d2948e713 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -62,7 +61,6 @@ public ClientProvisioningState() { * @param name a name to look for. * @return the corresponding ClientProvisioningState. */ - @JsonCreator public static ClientProvisioningState fromString(String name) { return fromString(name, ClientProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientState.java index b1ef97e9d9a99..27d5c4b93d472 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public ClientState() { * @param name a name to look for. * @return the corresponding ClientState. */ - @JsonCreator public static ClientState fromString(String name) { return fromString(name, ClientState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientsListResult.java index fa35ca7f3424b..a935a97318c10 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientsListResult.java @@ -5,25 +5,27 @@ 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.ClientInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Client operation. */ @Fluent -public final class ClientsListResult { +public final class ClientsListResult implements JsonSerializable { /* * A collection of Client. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of Client. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 ClientsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClientsListResult 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 ClientsListResult. + */ + public static ClientsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClientsListResult deserializedClientsListResult = new ClientsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ClientInner.fromJson(reader1)); + deserializedClientsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedClientsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedClientsListResult; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConnectionState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConnectionState.java index 5e6bd7221b950..43db07aa06337 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConnectionState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConnectionState.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * ConnectionState information. */ @Fluent -public final class ConnectionState { +public final class ConnectionState implements JsonSerializable { /* * Status of the connection. */ - @JsonProperty(value = "status") private PersistedConnectionStatus status; /* * Description of the connection state. */ - @JsonProperty(value = "description") private String description; /* * Actions required (if any). */ - @JsonProperty(value = "actionsRequired") private String actionsRequired; /** @@ -103,4 +104,46 @@ public ConnectionState withActionsRequired(String actionsRequired) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("actionsRequired", this.actionsRequired); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectionState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectionState 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 ConnectionState. + */ + public static ConnectionState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectionState deserializedConnectionState = new ConnectionState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedConnectionState.status = PersistedConnectionStatus.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedConnectionState.description = reader.getString(); + } else if ("actionsRequired".equals(fieldName)) { + deserializedConnectionState.actionsRequired = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectionState; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainConfiguration.java index c1a4cb3aedbf5..e9bec9c47fa2e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainConfiguration.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainConfiguration.java @@ -6,50 +6,56 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * A custom domain configuration that allows users to publish to their own domain name. */ @Fluent -public final class CustomDomainConfiguration { +public final class CustomDomainConfiguration implements JsonSerializable { /* * Fully Qualified Domain Name (FQDN) for the custom domain. */ - @JsonProperty(value = "fullyQualifiedDomainName", required = true) private String fullyQualifiedDomainName; /* - * Validation state for the custom domain. This is a read only property and is initially set to 'Pending' and will be updated to 'Approved' by Event Grid only after ownership of the domain name has been successfully validated. + * Validation state for the custom domain. This is a read only property and is initially set to 'Pending' and will + * be updated to 'Approved' by Event Grid only after ownership of the domain name has been successfully validated. */ - @JsonProperty(value = "validationState") private CustomDomainValidationState validationState; /* - * Identity info for accessing the certificate for the custom domain. This identity info must match an identity that has been set on the namespace. + * Identity info for accessing the certificate for the custom domain. This identity info must match an identity that + * has been set on the namespace. */ - @JsonProperty(value = "identity") private CustomDomainIdentity identity; /* - * The URL for the certificate that is used for publishing to the custom domain. We currently support certificates stored in Azure Key Vault only. While certificate URL can be either - * versioned URL of the following format https://{key-vault-name}.vault.azure.net/certificates/{certificate-name}/{version-id}, or unversioned URL of the following format (e.g., - * https://contosovault.vault.azure.net/certificates/contosocert, we support unversioned certificate URL only (e.g., https://contosovault.vault.azure.net/certificates/contosocert) + * The URL for the certificate that is used for publishing to the custom domain. We currently support certificates + * stored in Azure Key Vault only. While certificate URL can be either + * versioned URL of the following format + * https://{key-vault-name}.vault.azure.net/certificates/{certificate-name}/{version-id}, or unversioned URL of the + * following format (e.g., + * https://contosovault.vault.azure.net/certificates/contosocert, we support unversioned certificate URL only (e.g., + * https://contosovault.vault.azure.net/certificates/contosocert) */ - @JsonProperty(value = "certificateUrl") private String certificateUrl; /* - * Expected DNS TXT record name. Event Grid will check for a TXT record with this name in the DNS record set of the custom domain name to prove ownership over the domain. + * Expected DNS TXT record name. Event Grid will check for a TXT record with this name in the DNS record set of the + * custom domain name to prove ownership over the domain. * The values under this TXT record must contain the expected TXT record value. */ - @JsonProperty(value = "expectedTxtRecordName") private String expectedTxtRecordName; /* - * Expected DNS TXT record value. Event Grid will check for a TXT record with this value in the DNS record set of the custom domain name to prove ownership over the domain. + * Expected DNS TXT record value. Event Grid will check for a TXT record with this value in the DNS record set of + * the custom domain name to prove ownership over the domain. */ - @JsonProperty(value = "expectedTxtRecordValue") private String expectedTxtRecordValue; /** @@ -219,4 +225,58 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(CustomDomainConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("fullyQualifiedDomainName", this.fullyQualifiedDomainName); + jsonWriter.writeStringField("validationState", + this.validationState == null ? null : this.validationState.toString()); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("certificateUrl", this.certificateUrl); + jsonWriter.writeStringField("expectedTxtRecordName", this.expectedTxtRecordName); + jsonWriter.writeStringField("expectedTxtRecordValue", this.expectedTxtRecordValue); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CustomDomainConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomDomainConfiguration 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 CustomDomainConfiguration. + */ + public static CustomDomainConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomDomainConfiguration deserializedCustomDomainConfiguration = new CustomDomainConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("fullyQualifiedDomainName".equals(fieldName)) { + deserializedCustomDomainConfiguration.fullyQualifiedDomainName = reader.getString(); + } else if ("validationState".equals(fieldName)) { + deserializedCustomDomainConfiguration.validationState + = CustomDomainValidationState.fromString(reader.getString()); + } else if ("identity".equals(fieldName)) { + deserializedCustomDomainConfiguration.identity = CustomDomainIdentity.fromJson(reader); + } else if ("certificateUrl".equals(fieldName)) { + deserializedCustomDomainConfiguration.certificateUrl = reader.getString(); + } else if ("expectedTxtRecordName".equals(fieldName)) { + deserializedCustomDomainConfiguration.expectedTxtRecordName = reader.getString(); + } else if ("expectedTxtRecordValue".equals(fieldName)) { + deserializedCustomDomainConfiguration.expectedTxtRecordValue = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCustomDomainConfiguration; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainIdentity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainIdentity.java index 8b5adebc806dc..12139cfc75291 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainIdentity.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainIdentity.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 the custom domain. */ @Fluent -public final class CustomDomainIdentity { +public final class CustomDomainIdentity implements JsonSerializable { /* * The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. */ - @JsonProperty(value = "type") private CustomDomainIdentityType type; /* * The user identity associated with the resource. */ - @JsonProperty(value = "userAssignedIdentity") private String userAssignedIdentity; /** @@ -77,4 +79,43 @@ public CustomDomainIdentity withUserAssignedIdentity(String userAssignedIdentity */ public void validate() { } + + /** + * {@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 CustomDomainIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomDomainIdentity 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 CustomDomainIdentity. + */ + public static CustomDomainIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomDomainIdentity deserializedCustomDomainIdentity = new CustomDomainIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedCustomDomainIdentity.type = CustomDomainIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedCustomDomainIdentity.userAssignedIdentity = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCustomDomainIdentity; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainIdentityType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainIdentityType.java index 0429e7b71eb9c..351a8b1da1293 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainIdentityType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainIdentityType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public CustomDomainIdentityType() { * @param name a name to look for. * @return the corresponding CustomDomainIdentityType. */ - @JsonCreator public static CustomDomainIdentityType fromString(String name) { return fromString(name, CustomDomainIdentityType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainValidationState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainValidationState.java index 1fd86a44e0570..600e4ea5cf5e4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainValidationState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainValidationState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -44,7 +43,6 @@ public CustomDomainValidationState() { * @param name a name to look for. * @return the corresponding CustomDomainValidationState. */ - @JsonCreator public static CustomDomainValidationState fromString(String name) { return fromString(name, CustomDomainValidationState.class); } 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 index 5efcf37483af3..581b680b897f5 100644 --- 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 @@ -6,23 +6,26 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class CustomJwtAuthenticationManagedIdentity + implements JsonSerializable { /* * The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. */ - @JsonProperty(value = "type", required = true) private CustomJwtAuthenticationManagedIdentityType type; /* * The user identity associated with the resource. */ - @JsonProperty(value = "userAssignedIdentity") private String userAssignedIdentity; /** @@ -85,4 +88,46 @@ public void validate() { } 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 index 048b5c102d8d4..5e26e33f9cb53 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -38,7 +37,6 @@ public CustomJwtAuthenticationManagedIdentityType() { * @param name a name to look for. * @return the corresponding CustomJwtAuthenticationManagedIdentityType. */ - @JsonCreator public static CustomJwtAuthenticationManagedIdentityType fromString(String name) { return fromString(name, 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 index 58d48c4b54163..4b83a576db1d6 100644 --- 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 @@ -5,26 +5,34 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class CustomJwtAuthenticationSettings implements JsonSerializable { /* * Expected JWT token issuer. */ - @JsonProperty(value = "tokenIssuer") private String tokenIssuer; /* - * Information about the certificate that is used for token validation. We currently support maximum 2 certificates. + * Information about the certificates that are used for token validation. We currently support maximum 2 + * certificates. */ - @JsonProperty(value = "issuerCertificates") private List issuerCertificates; + /* + * Information about the encoded public certificates that are used for custom authentication. + */ + private List encodedIssuerCertificates; + /** * Creates an instance of CustomJwtAuthenticationSettings class. */ @@ -52,7 +60,7 @@ public CustomJwtAuthenticationSettings withTokenIssuer(String tokenIssuer) { } /** - * Get the issuerCertificates property: Information about the certificate that is used for token validation. We + * Get the issuerCertificates property: Information about the certificates that are used for token validation. We * currently support maximum 2 certificates. * * @return the issuerCertificates value. @@ -62,7 +70,7 @@ public List issuerCertificates() { } /** - * Set the issuerCertificates property: Information about the certificate that is used for token validation. We + * Set the issuerCertificates property: Information about the certificates that are used for token validation. We * currently support maximum 2 certificates. * * @param issuerCertificates the issuerCertificates value to set. @@ -73,6 +81,29 @@ public CustomJwtAuthenticationSettings withIssuerCertificates(List encodedIssuerCertificates() { + return this.encodedIssuerCertificates; + } + + /** + * Set the encodedIssuerCertificates property: Information about the encoded public certificates that are used for + * custom authentication. + * + * @param encodedIssuerCertificates the encodedIssuerCertificates value to set. + * @return the CustomJwtAuthenticationSettings object itself. + */ + public CustomJwtAuthenticationSettings + withEncodedIssuerCertificates(List encodedIssuerCertificates) { + this.encodedIssuerCertificates = encodedIssuerCertificates; + return this; + } + /** * Validates the instance. * @@ -82,5 +113,57 @@ public void validate() { if (issuerCertificates() != null) { issuerCertificates().forEach(e -> e.validate()); } + if (encodedIssuerCertificates() != null) { + encodedIssuerCertificates().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)); + jsonWriter.writeArrayField("encodedIssuerCertificates", this.encodedIssuerCertificates, + (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 if ("encodedIssuerCertificates".equals(fieldName)) { + List encodedIssuerCertificates + = reader.readArray(reader1 -> EncodedIssuerCertificateInfo.fromJson(reader1)); + deserializedCustomJwtAuthenticationSettings.encodedIssuerCertificates = encodedIssuerCertificates; + } else { + reader.skipChildren(); + } + } + + return deserializedCustomJwtAuthenticationSettings; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DataResidencyBoundary.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DataResidencyBoundary.java index 40f40ffe522cd..8c64d754a51bd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DataResidencyBoundary.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DataResidencyBoundary.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public DataResidencyBoundary() { * @param name a name to look for. * @return the corresponding DataResidencyBoundary. */ - @JsonCreator public static DataResidencyBoundary fromString(String name) { return fromString(name, DataResidencyBoundary.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterDestination.java index f520c3069afd9..d778ee1c733ad 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterDestination.java @@ -5,38 +5,28 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +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 dead letter destination for an event subscription. To configure a deadletter destination, do * not directly instantiate an object of this class. Instead, instantiate an object of a derived class. Currently, * StorageBlobDeadLetterDestination is the only class that derives from this class. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = DeadLetterDestination.class, - visible = true) -@JsonTypeName("DeadLetterDestination") -@JsonSubTypes({ @JsonSubTypes.Type(name = "StorageBlob", value = StorageBlobDeadLetterDestination.class) }) @Immutable -public class DeadLetterDestination { +public class DeadLetterDestination implements JsonSerializable { /* * Type of the endpoint for the dead letter destination */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) - private DeadLetterEndPointType endpointType; + private DeadLetterEndPointType endpointType = DeadLetterEndPointType.fromString("DeadLetterDestination"); /** * Creates an instance of DeadLetterDestination class. */ public DeadLetterDestination() { - this.endpointType = DeadLetterEndPointType.fromString("DeadLetterDestination"); } /** @@ -55,4 +45,66 @@ public DeadLetterEndPointType endpointType() { */ 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 DeadLetterDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeadLetterDestination 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 DeadLetterDestination. + */ + public static DeadLetterDestination 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 ("StorageBlob".equals(discriminatorValue)) { + return StorageBlobDeadLetterDestination.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static DeadLetterDestination fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeadLetterDestination deserializedDeadLetterDestination = new DeadLetterDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedDeadLetterDestination.endpointType + = DeadLetterEndPointType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDeadLetterDestination; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterEndPointType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterEndPointType.java index ccdbf17129d4d..4c50a7afc1c81 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterEndPointType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterEndPointType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public DeadLetterEndPointType() { * @param name a name to look for. * @return the corresponding DeadLetterEndPointType. */ - @JsonCreator public static DeadLetterEndPointType fromString(String name) { return fromString(name, DeadLetterEndPointType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterWithResourceIdentity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterWithResourceIdentity.java index 1ea89d5d65b19..bdb7b99b930d9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterWithResourceIdentity.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterWithResourceIdentity.java @@ -5,24 +5,27 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 deadletter destination with resource identity. */ @Fluent -public final class DeadLetterWithResourceIdentity { +public final class DeadLetterWithResourceIdentity implements JsonSerializable { /* * The identity to use when dead-lettering events. */ - @JsonProperty(value = "identity") private EventSubscriptionIdentity identity; /* * Information about the destination where events have to be delivered for the event subscription. - * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during dead-lettering. + * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication + * tokens being used during dead-lettering. */ - @JsonProperty(value = "deadLetterDestination") private DeadLetterDestination deadLetterDestination; /** @@ -90,4 +93,45 @@ public void validate() { deadLetterDestination().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("deadLetterDestination", this.deadLetterDestination); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeadLetterWithResourceIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeadLetterWithResourceIdentity 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 DeadLetterWithResourceIdentity. + */ + public static DeadLetterWithResourceIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeadLetterWithResourceIdentity deserializedDeadLetterWithResourceIdentity + = new DeadLetterWithResourceIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedDeadLetterWithResourceIdentity.identity = EventSubscriptionIdentity.fromJson(reader); + } else if ("deadLetterDestination".equals(fieldName)) { + deserializedDeadLetterWithResourceIdentity.deadLetterDestination + = DeadLetterDestination.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeadLetterWithResourceIdentity; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMapping.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMapping.java index 3eaac8ff6ccd1..2129ee1253365 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMapping.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMapping.java @@ -5,44 +5,31 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Delivery attribute mapping details. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type", - defaultImpl = DeliveryAttributeMapping.class, - visible = true) -@JsonTypeName("DeliveryAttributeMapping") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Static", value = StaticDeliveryAttributeMapping.class), - @JsonSubTypes.Type(name = "Dynamic", value = DynamicDeliveryAttributeMapping.class) }) @Fluent -public class DeliveryAttributeMapping { +public class DeliveryAttributeMapping implements JsonSerializable { /* * Type of the delivery attribute or header name. */ - @JsonTypeId - @JsonProperty(value = "type", required = true) - private DeliveryAttributeMappingType type; + private DeliveryAttributeMappingType type = DeliveryAttributeMappingType.fromString("DeliveryAttributeMapping"); /* * Name of the delivery attribute or header. */ - @JsonProperty(value = "name") private String name; /** * Creates an instance of DeliveryAttributeMapping class. */ public DeliveryAttributeMapping() { - this.type = DeliveryAttributeMappingType.fromString("DeliveryAttributeMapping"); } /** @@ -81,4 +68,71 @@ public DeliveryAttributeMapping withName(String name) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeliveryAttributeMapping from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeliveryAttributeMapping 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 DeliveryAttributeMapping. + */ + public static DeliveryAttributeMapping 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 ("type".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Static".equals(discriminatorValue)) { + return StaticDeliveryAttributeMapping.fromJson(readerToUse.reset()); + } else if ("Dynamic".equals(discriminatorValue)) { + return DynamicDeliveryAttributeMapping.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static DeliveryAttributeMapping fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeliveryAttributeMapping deserializedDeliveryAttributeMapping = new DeliveryAttributeMapping(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedDeliveryAttributeMapping.type + = DeliveryAttributeMappingType.fromString(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedDeliveryAttributeMapping.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeliveryAttributeMapping; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMappingType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMappingType.java index a18b924bb06c4..1e5096453e301 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMappingType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMappingType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public DeliveryAttributeMappingType() { * @param name a name to look for. * @return the corresponding DeliveryAttributeMappingType. */ - @JsonCreator public static DeliveryAttributeMappingType fromString(String name) { return fromString(name, DeliveryAttributeMappingType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryConfiguration.java index 0ab261cec81f9..28e3d2ef6ef28 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryConfiguration.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryConfiguration.java @@ -5,29 +5,32 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 delivery configuration information of the event subscription. */ @Fluent -public final class DeliveryConfiguration { +public final class DeliveryConfiguration implements JsonSerializable { /* * Delivery mode of the event subscription. */ - @JsonProperty(value = "deliveryMode") private DeliveryMode deliveryMode; /* - * This property should be populated when deliveryMode is queue and represents information about the queue subscription. + * This property should be populated when deliveryMode is queue and represents information about the queue + * subscription. */ - @JsonProperty(value = "queue") private QueueInfo queue; /* - * This property should be populated when deliveryMode is push and represents information about the push subscription. + * This property should be populated when deliveryMode is push and represents information about the push + * subscription. */ - @JsonProperty(value = "push") private PushInfo push; /** @@ -113,4 +116,46 @@ public void validate() { push().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("deliveryMode", this.deliveryMode == null ? null : this.deliveryMode.toString()); + jsonWriter.writeJsonField("queue", this.queue); + jsonWriter.writeJsonField("push", this.push); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeliveryConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeliveryConfiguration 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 DeliveryConfiguration. + */ + public static DeliveryConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeliveryConfiguration deserializedDeliveryConfiguration = new DeliveryConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deliveryMode".equals(fieldName)) { + deserializedDeliveryConfiguration.deliveryMode = DeliveryMode.fromString(reader.getString()); + } else if ("queue".equals(fieldName)) { + deserializedDeliveryConfiguration.queue = QueueInfo.fromJson(reader); + } else if ("push".equals(fieldName)) { + deserializedDeliveryConfiguration.push = PushInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeliveryConfiguration; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryMode.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryMode.java index e51c4f31c474e..2070b74f09b06 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryMode.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryMode.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public DeliveryMode() { * @param name a name to look for. * @return the corresponding DeliveryMode. */ - @JsonCreator public static DeliveryMode fromString(String name) { return fromString(name, DeliveryMode.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliverySchema.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliverySchema.java index eb214fd0b4c74..47cf9dec1bca5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliverySchema.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliverySchema.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public DeliverySchema() { * @param name a name to look for. * @return the corresponding DeliverySchema. */ - @JsonCreator public static DeliverySchema fromString(String name) { return fromString(name, DeliverySchema.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryWithResourceIdentity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryWithResourceIdentity.java index ac4ad874b3672..d5f6f811acbf2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryWithResourceIdentity.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryWithResourceIdentity.java @@ -5,24 +5,27 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 delivery for an event subscription with resource identity. */ @Fluent -public final class DeliveryWithResourceIdentity { +public final class DeliveryWithResourceIdentity implements JsonSerializable { /* * The identity to use when delivering events. */ - @JsonProperty(value = "identity") private EventSubscriptionIdentity identity; /* * Information about the destination where events have to be delivered for the event subscription. - * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery. + * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication + * tokens being used during delivery. */ - @JsonProperty(value = "destination") private EventSubscriptionDestination destination; /** @@ -90,4 +93,44 @@ public void validate() { destination().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("destination", this.destination); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeliveryWithResourceIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeliveryWithResourceIdentity 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 DeliveryWithResourceIdentity. + */ + public static DeliveryWithResourceIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeliveryWithResourceIdentity deserializedDeliveryWithResourceIdentity = new DeliveryWithResourceIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedDeliveryWithResourceIdentity.identity = EventSubscriptionIdentity.fromJson(reader); + } else if ("destination".equals(fieldName)) { + deserializedDeliveryWithResourceIdentity.destination + = EventSubscriptionDestination.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeliveryWithResourceIdentity; + }); + } } 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 480236eb5e487..4a463a332832f 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 @@ -66,7 +66,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. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainProvisioningState.java index 720a0af3f93c9..7f52130ec5d08 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public DomainProvisioningState() { * @param name a name to look for. * @return the corresponding DomainProvisioningState. */ - @JsonCreator public static DomainProvisioningState fromString(String name) { return fromString(name, DomainProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainRegenerateKeyRequest.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainRegenerateKeyRequest.java index 5b28f8e86726b..5faf511278b24 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainRegenerateKeyRequest.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainRegenerateKeyRequest.java @@ -6,17 +6,20 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Domain regenerate share access key request. */ @Fluent -public final class DomainRegenerateKeyRequest { +public final class DomainRegenerateKeyRequest implements JsonSerializable { /* * Key name to regenerate key1 or key2. */ - @JsonProperty(value = "keyName", required = true) private String keyName; /** @@ -59,4 +62,41 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(DomainRegenerateKeyRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyName", this.keyName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DomainRegenerateKeyRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainRegenerateKeyRequest 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 DomainRegenerateKeyRequest. + */ + public static DomainRegenerateKeyRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DomainRegenerateKeyRequest deserializedDomainRegenerateKeyRequest = new DomainRegenerateKeyRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyName".equals(fieldName)) { + deserializedDomainRegenerateKeyRequest.keyName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDomainRegenerateKeyRequest; + }); + } } 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 2ba7762e4640e..50e7ebc646bec 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/DomainTopicProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicProvisioningState.java index c289eab52e7c8..e4e9bf426319f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public DomainTopicProvisioningState() { * @param name a name to look for. * @return the corresponding DomainTopicProvisioningState. */ - @JsonCreator public static DomainTopicProvisioningState fromString(String name) { return fromString(name, DomainTopicProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicsListResult.java index 149656290d386..76582c8e71b84 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicsListResult.java @@ -5,25 +5,27 @@ 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.DomainTopicInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Domain Topics operation. */ @Fluent -public final class DomainTopicsListResult { +public final class DomainTopicsListResult implements JsonSerializable { /* * A collection of Domain Topics. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of domain topics. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 DomainTopicsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainTopicsListResult 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 DomainTopicsListResult. + */ + public static DomainTopicsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DomainTopicsListResult deserializedDomainTopicsListResult = new DomainTopicsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> DomainTopicInner.fromJson(reader1)); + deserializedDomainTopicsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDomainTopicsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDomainTopicsListResult; + }); + } } 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 0f2035f4a6051..67f4a66df4ef8 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 @@ -5,9 +5,12 @@ 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.DomainUpdateParameterProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -15,30 +18,25 @@ * Properties of the Domain update. */ @Fluent -public final class DomainUpdateParameters { +public final class DomainUpdateParameters implements JsonSerializable { /* * Tags of the domains resource. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Properties of the resource. */ - @JsonProperty(value = "properties") private DomainUpdateParameterProperties innerProperties; /* * Identity information for the resource. */ - @JsonProperty(value = "identity") private IdentityInfo identity; /* * The Sku pricing tier for the domain. */ - @JsonProperty(value = "sku") private ResourceSku sku; /** @@ -381,4 +379,51 @@ public void validate() { sku().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("sku", this.sku); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DomainUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainUpdateParameters 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 DomainUpdateParameters. + */ + public static DomainUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DomainUpdateParameters deserializedDomainUpdateParameters = new DomainUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDomainUpdateParameters.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedDomainUpdateParameters.innerProperties + = 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(); + } + } + + return deserializedDomainUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainsListResult.java index 1479d1f91eca4..6816c89e6c289 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainsListResult.java @@ -5,25 +5,27 @@ 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.DomainInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Domains operation. */ @Fluent -public final class DomainsListResult { +public final class DomainsListResult implements JsonSerializable { /* * A collection of Domains. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of domains. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 DomainsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainsListResult 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 DomainsListResult. + */ + public static DomainsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DomainsListResult deserializedDomainsListResult = new DomainsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> DomainInner.fromJson(reader1)); + deserializedDomainsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDomainsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDomainsListResult; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicDeliveryAttributeMapping.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicDeliveryAttributeMapping.java index 0d0d1a395ce66..9f704b4064f1c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicDeliveryAttributeMapping.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicDeliveryAttributeMapping.java @@ -5,34 +5,25 @@ 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.DynamicDeliveryAttributeMappingProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; /** * Dynamic delivery attribute mapping details. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type", - defaultImpl = DynamicDeliveryAttributeMapping.class, - visible = true) -@JsonTypeName("Dynamic") @Fluent public final class DynamicDeliveryAttributeMapping extends DeliveryAttributeMapping { /* * Type of the delivery attribute or header name. */ - @JsonTypeId - @JsonProperty(value = "type", required = true) private DeliveryAttributeMappingType type = DeliveryAttributeMappingType.DYNAMIC; /* * Properties of dynamic delivery attribute mapping. */ - @JsonProperty(value = "properties") private DynamicDeliveryAttributeMappingProperties innerProperties; /** @@ -99,9 +90,53 @@ public DynamicDeliveryAttributeMapping withSourceField(String sourceField) { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DynamicDeliveryAttributeMapping from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DynamicDeliveryAttributeMapping 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 DynamicDeliveryAttributeMapping. + */ + public static DynamicDeliveryAttributeMapping fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DynamicDeliveryAttributeMapping deserializedDynamicDeliveryAttributeMapping + = new DynamicDeliveryAttributeMapping(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedDynamicDeliveryAttributeMapping.withName(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedDynamicDeliveryAttributeMapping.type + = DeliveryAttributeMappingType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedDynamicDeliveryAttributeMapping.innerProperties + = DynamicDeliveryAttributeMappingProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDynamicDeliveryAttributeMapping; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicRoutingEnrichment.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicRoutingEnrichment.java index 8655702600b1f..55ce0678f4ea9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicRoutingEnrichment.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicRoutingEnrichment.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 DynamicRoutingEnrichment model. */ @Fluent -public final class DynamicRoutingEnrichment { +public final class DynamicRoutingEnrichment implements JsonSerializable { /* * Dynamic routing enrichment key. */ - @JsonProperty(value = "key") private String key; /* * Dynamic routing enrichment value. */ - @JsonProperty(value = "value") private String value; /** @@ -77,4 +79,43 @@ public DynamicRoutingEnrichment withValue(String value) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DynamicRoutingEnrichment from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DynamicRoutingEnrichment 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 DynamicRoutingEnrichment. + */ + public static DynamicRoutingEnrichment fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DynamicRoutingEnrichment deserializedDynamicRoutingEnrichment = new DynamicRoutingEnrichment(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedDynamicRoutingEnrichment.key = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedDynamicRoutingEnrichment.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDynamicRoutingEnrichment; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EncodedIssuerCertificateInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EncodedIssuerCertificateInfo.java new file mode 100644 index 0000000000000..b3cc57621aecc --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EncodedIssuerCertificateInfo.java @@ -0,0 +1,135 @@ +// Copyright (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 public certificate that is used for custom authentication. + */ +@Fluent +public final class EncodedIssuerCertificateInfo implements JsonSerializable { + /* + * Identifier for the certificate. + */ + private String kid; + + /* + * Certificate in pem format. + */ + private String encodedCertificate; + + /** + * Creates an instance of EncodedIssuerCertificateInfo class. + */ + public EncodedIssuerCertificateInfo() { + } + + /** + * Get the kid property: Identifier for the certificate. + * + * @return the kid value. + */ + public String kid() { + return this.kid; + } + + /** + * Set the kid property: Identifier for the certificate. + * + * @param kid the kid value to set. + * @return the EncodedIssuerCertificateInfo object itself. + */ + public EncodedIssuerCertificateInfo withKid(String kid) { + this.kid = kid; + return this; + } + + /** + * Get the encodedCertificate property: Certificate in pem format. + * + * @return the encodedCertificate value. + */ + public String encodedCertificate() { + return this.encodedCertificate; + } + + /** + * Set the encodedCertificate property: Certificate in pem format. + * + * @param encodedCertificate the encodedCertificate value to set. + * @return the EncodedIssuerCertificateInfo object itself. + */ + public EncodedIssuerCertificateInfo withEncodedCertificate(String encodedCertificate) { + this.encodedCertificate = encodedCertificate; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kid() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property kid in model EncodedIssuerCertificateInfo")); + } + if (encodedCertificate() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property encodedCertificate in model EncodedIssuerCertificateInfo")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EncodedIssuerCertificateInfo.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kid", this.kid); + jsonWriter.writeStringField("encodedCertificate", this.encodedCertificate); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EncodedIssuerCertificateInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EncodedIssuerCertificateInfo 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 EncodedIssuerCertificateInfo. + */ + public static EncodedIssuerCertificateInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EncodedIssuerCertificateInfo deserializedEncodedIssuerCertificateInfo = new EncodedIssuerCertificateInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kid".equals(fieldName)) { + deserializedEncodedIssuerCertificateInfo.kid = reader.getString(); + } else if ("encodedCertificate".equals(fieldName)) { + deserializedEncodedIssuerCertificateInfo.encodedCertificate = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEncodedIssuerCertificateInfo; + }); + } +} 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 729ce163a58f8..8bcfdbb9a90a8 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -77,7 +76,6 @@ public EndpointType() { * @param name a name to look for. * @return the corresponding EndpointType. */ - @JsonCreator public static EndpointType fromString(String name) { return fromString(name, EndpointType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDefinitionKind.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDefinitionKind.java index d0b8468bab1f9..6f46ed61d1573 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDefinitionKind.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDefinitionKind.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public EventDefinitionKind() { * @param name a name to look for. * @return the corresponding EventDefinitionKind. */ - @JsonCreator public static EventDefinitionKind fromString(String name) { return fromString(name, EventDefinitionKind.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDeliverySchema.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDeliverySchema.java index 30ea89ed3c825..282923da71bab 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDeliverySchema.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDeliverySchema.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public EventDeliverySchema() { * @param name a name to look for. * @return the corresponding EventDeliverySchema. */ - @JsonCreator public static EventDeliverySchema fromString(String name) { return fromString(name, EventDeliverySchema.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventHubEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventHubEventSubscriptionDestination.java index 50ee576cd3215..70c02226a6a44 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventHubEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventHubEventSubscriptionDestination.java @@ -5,35 +5,26 @@ 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.EventHubEventSubscriptionDestinationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; import java.util.List; /** * Information about the event hub destination for an event subscription. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = EventHubEventSubscriptionDestination.class, - visible = true) -@JsonTypeName("EventHub") @Fluent public final class EventHubEventSubscriptionDestination extends EventSubscriptionDestination { /* * Type of the endpoint for the event subscription destination. */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private EndpointType endpointType = EndpointType.EVENT_HUB; /* * Event Hub Properties of the event subscription destination. */ - @JsonProperty(value = "properties") private EventHubEventSubscriptionDestinationProperties innerProperties; /** @@ -117,9 +108,50 @@ public List deliveryAttributeMappings() { */ @Override public void validate() { - super.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 EventHubEventSubscriptionDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventHubEventSubscriptionDestination 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 EventHubEventSubscriptionDestination. + */ + public static EventHubEventSubscriptionDestination fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventHubEventSubscriptionDestination deserializedEventHubEventSubscriptionDestination + = new EventHubEventSubscriptionDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedEventHubEventSubscriptionDestination.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedEventHubEventSubscriptionDestination.innerProperties + = EventHubEventSubscriptionDestinationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEventHubEventSubscriptionDestination; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventInputSchema.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventInputSchema.java index 5565211fcbecb..dae327690ac55 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventInputSchema.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventInputSchema.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public EventInputSchema() { * @param name a name to look for. * @return the corresponding EventInputSchema. */ - @JsonCreator public static EventInputSchema fromString(String name) { return fromString(name, EventInputSchema.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscription.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscription.java index 228641b98e189..7afbc4d8dbcf1 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 a0cc18e5c34b2..e97db3a5fea12 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 @@ -5,46 +5,26 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +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 destination for an event subscription. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = EventSubscriptionDestination.class, - visible = true) -@JsonTypeName("EventSubscriptionDestination") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "WebHook", value = WebhookEventSubscriptionDestination.class), - @JsonSubTypes.Type(name = "EventHub", value = EventHubEventSubscriptionDestination.class), - @JsonSubTypes.Type(name = "StorageQueue", value = StorageQueueEventSubscriptionDestination.class), - @JsonSubTypes.Type(name = "HybridConnection", value = HybridConnectionEventSubscriptionDestination.class), - @JsonSubTypes.Type(name = "ServiceBusQueue", value = ServiceBusQueueEventSubscriptionDestination.class), - @JsonSubTypes.Type(name = "ServiceBusTopic", value = ServiceBusTopicEventSubscriptionDestination.class), - @JsonSubTypes.Type(name = "AzureFunction", value = AzureFunctionEventSubscriptionDestination.class), - @JsonSubTypes.Type(name = "PartnerDestination", value = PartnerEventSubscriptionDestination.class), - @JsonSubTypes.Type(name = "MonitorAlert", value = MonitorAlertEventSubscriptionDestination.class), - @JsonSubTypes.Type(name = "NamespaceTopic", value = NamespaceTopicEventSubscriptionDestination.class) }) @Immutable -public class EventSubscriptionDestination { +public class EventSubscriptionDestination implements JsonSerializable { /* * Type of the endpoint for the event subscription destination. */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) - private EndpointType endpointType; + private EndpointType endpointType = EndpointType.fromString("EventSubscriptionDestination"); /** * Creates an instance of EventSubscriptionDestination class. */ public EventSubscriptionDestination() { - this.endpointType = EndpointType.fromString("EventSubscriptionDestination"); } /** @@ -63,4 +43,83 @@ public EndpointType endpointType() { */ 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 EventSubscriptionDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventSubscriptionDestination 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 EventSubscriptionDestination. + */ + public static EventSubscriptionDestination 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 WebhookEventSubscriptionDestination.fromJson(readerToUse.reset()); + } else if ("EventHub".equals(discriminatorValue)) { + return EventHubEventSubscriptionDestination.fromJson(readerToUse.reset()); + } else if ("StorageQueue".equals(discriminatorValue)) { + return StorageQueueEventSubscriptionDestination.fromJson(readerToUse.reset()); + } else if ("HybridConnection".equals(discriminatorValue)) { + return HybridConnectionEventSubscriptionDestination.fromJson(readerToUse.reset()); + } else if ("ServiceBusQueue".equals(discriminatorValue)) { + return ServiceBusQueueEventSubscriptionDestination.fromJson(readerToUse.reset()); + } else if ("ServiceBusTopic".equals(discriminatorValue)) { + 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)) { + return NamespaceTopicEventSubscriptionDestination.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static EventSubscriptionDestination fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventSubscriptionDestination deserializedEventSubscriptionDestination = new EventSubscriptionDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedEventSubscriptionDestination.endpointType = EndpointType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedEventSubscriptionDestination; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFilter.java index 79b9cff5c23c4..6a4ad2592b055 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFilter.java @@ -5,52 +5,51 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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; /** * Filter for the Event Subscription. */ @Fluent -public final class EventSubscriptionFilter { +public final class EventSubscriptionFilter implements JsonSerializable { /* * An optional string to filter events for an event subscription based on a resource path prefix. * The format of this depends on the publisher of the events. * Wildcard characters are not supported in this path. */ - @JsonProperty(value = "subjectBeginsWith") private String subjectBeginsWith; /* * An optional string to filter events for an event subscription based on a resource path suffix. * Wildcard characters are not supported in this path. */ - @JsonProperty(value = "subjectEndsWith") private String subjectEndsWith; /* - * A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null. + * A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to + * all default event types, set the IncludedEventTypes to null. */ - @JsonProperty(value = "includedEventTypes") private List includedEventTypes; /* * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. */ - @JsonProperty(value = "isSubjectCaseSensitive") private Boolean isSubjectCaseSensitive; /* * Allows advanced filters to be evaluated against an array of values instead of expecting a singular value. */ - @JsonProperty(value = "enableAdvancedFilteringOnArrays") private Boolean enableAdvancedFilteringOnArrays; /* * An array of advanced filters that are used for filtering event subscriptions. */ - @JsonProperty(value = "advancedFilters") private List advancedFilters; /** @@ -207,4 +206,62 @@ public void validate() { advancedFilters().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("subjectBeginsWith", this.subjectBeginsWith); + jsonWriter.writeStringField("subjectEndsWith", this.subjectEndsWith); + jsonWriter.writeArrayField("includedEventTypes", this.includedEventTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("isSubjectCaseSensitive", this.isSubjectCaseSensitive); + jsonWriter.writeBooleanField("enableAdvancedFilteringOnArrays", this.enableAdvancedFilteringOnArrays); + jsonWriter.writeArrayField("advancedFilters", this.advancedFilters, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventSubscriptionFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventSubscriptionFilter 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 EventSubscriptionFilter. + */ + public static EventSubscriptionFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventSubscriptionFilter deserializedEventSubscriptionFilter = new EventSubscriptionFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("subjectBeginsWith".equals(fieldName)) { + deserializedEventSubscriptionFilter.subjectBeginsWith = reader.getString(); + } else if ("subjectEndsWith".equals(fieldName)) { + deserializedEventSubscriptionFilter.subjectEndsWith = reader.getString(); + } else if ("includedEventTypes".equals(fieldName)) { + List includedEventTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedEventSubscriptionFilter.includedEventTypes = includedEventTypes; + } else if ("isSubjectCaseSensitive".equals(fieldName)) { + deserializedEventSubscriptionFilter.isSubjectCaseSensitive + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableAdvancedFilteringOnArrays".equals(fieldName)) { + deserializedEventSubscriptionFilter.enableAdvancedFilteringOnArrays + = reader.getNullable(JsonReader::getBoolean); + } else if ("advancedFilters".equals(fieldName)) { + List advancedFilters + = reader.readArray(reader1 -> AdvancedFilter.fromJson(reader1)); + deserializedEventSubscriptionFilter.advancedFilters = advancedFilters; + } else { + reader.skipChildren(); + } + } + + return deserializedEventSubscriptionFilter; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentity.java index e9a43614f877f..902ec04c677e2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentity.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentity.java @@ -5,25 +5,32 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 with the event subscription. */ @Fluent -public final class EventSubscriptionIdentity { +public final class EventSubscriptionIdentity implements JsonSerializable { /* * The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'. */ - @JsonProperty(value = "type") private EventSubscriptionIdentityType type; /* * The user identity associated with the resource. */ - @JsonProperty(value = "userAssignedIdentity") private String userAssignedIdentity; + /* + * The details of the Federated Identity Credential (FIC) used with the resource delivery. + */ + private FederatedIdentityCredentialInfo federatedIdentityCredentialInfo; + /** * Creates an instance of EventSubscriptionIdentity class. */ @@ -70,11 +77,81 @@ public EventSubscriptionIdentity withUserAssignedIdentity(String userAssignedIde return this; } + /** + * Get the federatedIdentityCredentialInfo property: The details of the Federated Identity Credential (FIC) used + * with the resource delivery. + * + * @return the federatedIdentityCredentialInfo value. + */ + public FederatedIdentityCredentialInfo federatedIdentityCredentialInfo() { + return this.federatedIdentityCredentialInfo; + } + + /** + * Set the federatedIdentityCredentialInfo property: The details of the Federated Identity Credential (FIC) used + * with the resource delivery. + * + * @param federatedIdentityCredentialInfo the federatedIdentityCredentialInfo value to set. + * @return the EventSubscriptionIdentity object itself. + */ + public EventSubscriptionIdentity + withFederatedIdentityCredentialInfo(FederatedIdentityCredentialInfo federatedIdentityCredentialInfo) { + this.federatedIdentityCredentialInfo = federatedIdentityCredentialInfo; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (federatedIdentityCredentialInfo() != null) { + federatedIdentityCredentialInfo().validate(); + } + } + + /** + * {@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); + jsonWriter.writeJsonField("federatedIdentityCredentialInfo", this.federatedIdentityCredentialInfo); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventSubscriptionIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventSubscriptionIdentity 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 EventSubscriptionIdentity. + */ + public static EventSubscriptionIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventSubscriptionIdentity deserializedEventSubscriptionIdentity = new EventSubscriptionIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedEventSubscriptionIdentity.type + = EventSubscriptionIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedEventSubscriptionIdentity.userAssignedIdentity = reader.getString(); + } else if ("federatedIdentityCredentialInfo".equals(fieldName)) { + deserializedEventSubscriptionIdentity.federatedIdentityCredentialInfo + = FederatedIdentityCredentialInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEventSubscriptionIdentity; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentityType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentityType.java index e7db14869099d..b4eba3354b9bf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentityType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentityType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public EventSubscriptionIdentityType() { * @param name a name to look for. * @return the corresponding EventSubscriptionIdentityType. */ - @JsonCreator public static EventSubscriptionIdentityType fromString(String name) { return fromString(name, EventSubscriptionIdentityType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionProvisioningState.java index 5bd97111c729d..62783951a2e67 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -62,7 +61,6 @@ public EventSubscriptionProvisioningState() { * @param name a name to look for. * @return the corresponding EventSubscriptionProvisioningState. */ - @JsonCreator public static EventSubscriptionProvisioningState fromString(String name) { return fromString(name, EventSubscriptionProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionUpdateParameters.java index 7e2e44786668f..983fcad7f6d20 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionUpdateParameters.java @@ -5,71 +5,75 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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; import java.util.List; /** * Properties of the Event Subscription update. */ @Fluent -public final class EventSubscriptionUpdateParameters { +public final class EventSubscriptionUpdateParameters implements JsonSerializable { /* * Information about the destination where events have to be delivered for the event subscription. - * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering. + * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / + * dead-lettering. */ - @JsonProperty(value = "destination") private EventSubscriptionDestination destination; /* * Information about the destination where events have to be delivered for the event subscription. - * Uses the managed identity setup on the parent resource (topic / domain) to acquire the authentication tokens being used during delivery / dead-lettering. + * Uses the managed identity setup on the parent resource (topic / domain) to acquire the authentication tokens + * being used during delivery / dead-lettering. */ - @JsonProperty(value = "deliveryWithResourceIdentity") private DeliveryWithResourceIdentity deliveryWithResourceIdentity; /* * Information about the filter for the event subscription. */ - @JsonProperty(value = "filter") private EventSubscriptionFilter filter; /* * List of user defined labels. */ - @JsonProperty(value = "labels") private List labels; /* * Information about the expiration time for the event subscription. */ - @JsonProperty(value = "expirationTimeUtc") private OffsetDateTime expirationTimeUtc; /* * The event delivery schema for the event subscription. */ - @JsonProperty(value = "eventDeliverySchema") private EventDeliverySchema eventDeliverySchema; /* - * The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. + * The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live + * for events. */ - @JsonProperty(value = "retryPolicy") private RetryPolicy retryPolicy; /* - * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. - * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering. + * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is + * sent to the dead letter destination. + * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / + * dead-lettering. */ - @JsonProperty(value = "deadLetterDestination") private DeadLetterDestination deadLetterDestination; /* - * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. - * Uses the managed identity setup on the parent resource (topic / domain) to acquire the authentication tokens being used during delivery / dead-lettering. + * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is + * sent to the dead letter destination. + * Uses the managed identity setup on the parent resource (topic / domain) to acquire the authentication tokens + * being used during delivery / dead-lettering. */ - @JsonProperty(value = "deadLetterWithResourceIdentity") private DeadLetterWithResourceIdentity deadLetterWithResourceIdentity; /** @@ -311,4 +315,76 @@ public void validate() { deadLetterWithResourceIdentity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("destination", this.destination); + jsonWriter.writeJsonField("deliveryWithResourceIdentity", this.deliveryWithResourceIdentity); + jsonWriter.writeJsonField("filter", this.filter); + jsonWriter.writeArrayField("labels", this.labels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("expirationTimeUtc", + this.expirationTimeUtc == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationTimeUtc)); + jsonWriter.writeStringField("eventDeliverySchema", + this.eventDeliverySchema == null ? null : this.eventDeliverySchema.toString()); + jsonWriter.writeJsonField("retryPolicy", this.retryPolicy); + jsonWriter.writeJsonField("deadLetterDestination", this.deadLetterDestination); + jsonWriter.writeJsonField("deadLetterWithResourceIdentity", this.deadLetterWithResourceIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventSubscriptionUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventSubscriptionUpdateParameters 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 EventSubscriptionUpdateParameters. + */ + public static EventSubscriptionUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventSubscriptionUpdateParameters deserializedEventSubscriptionUpdateParameters + = new EventSubscriptionUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("destination".equals(fieldName)) { + deserializedEventSubscriptionUpdateParameters.destination + = EventSubscriptionDestination.fromJson(reader); + } else if ("deliveryWithResourceIdentity".equals(fieldName)) { + deserializedEventSubscriptionUpdateParameters.deliveryWithResourceIdentity + = DeliveryWithResourceIdentity.fromJson(reader); + } else if ("filter".equals(fieldName)) { + deserializedEventSubscriptionUpdateParameters.filter = EventSubscriptionFilter.fromJson(reader); + } else if ("labels".equals(fieldName)) { + List labels = reader.readArray(reader1 -> reader1.getString()); + deserializedEventSubscriptionUpdateParameters.labels = labels; + } else if ("expirationTimeUtc".equals(fieldName)) { + deserializedEventSubscriptionUpdateParameters.expirationTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("eventDeliverySchema".equals(fieldName)) { + deserializedEventSubscriptionUpdateParameters.eventDeliverySchema + = EventDeliverySchema.fromString(reader.getString()); + } else if ("retryPolicy".equals(fieldName)) { + deserializedEventSubscriptionUpdateParameters.retryPolicy = RetryPolicy.fromJson(reader); + } else if ("deadLetterDestination".equals(fieldName)) { + deserializedEventSubscriptionUpdateParameters.deadLetterDestination + = DeadLetterDestination.fromJson(reader); + } else if ("deadLetterWithResourceIdentity".equals(fieldName)) { + deserializedEventSubscriptionUpdateParameters.deadLetterWithResourceIdentity + = DeadLetterWithResourceIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEventSubscriptionUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionsListResult.java index fab37000b2b2b..54f3ce885267a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionsListResult.java @@ -5,25 +5,27 @@ 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.EventSubscriptionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List EventSubscriptions operation. */ @Fluent -public final class EventSubscriptionsListResult { +public final class EventSubscriptionsListResult implements JsonSerializable { /* * A collection of EventSubscriptions */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of event subscriptions */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,45 @@ public void validate() { 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 EventSubscriptionsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventSubscriptionsListResult 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 EventSubscriptionsListResult. + */ + public static EventSubscriptionsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventSubscriptionsListResult deserializedEventSubscriptionsListResult = new EventSubscriptionsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> EventSubscriptionInner.fromJson(reader1)); + deserializedEventSubscriptionsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEventSubscriptionsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEventSubscriptionsListResult; + }); + } } 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 bb1ceeb24d6c0..436a512d0afa4 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/EventTypeInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypeInfo.java index 13749eaf13985..6e23d0e95060b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypeInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypeInfo.java @@ -5,28 +5,30 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import 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; /** * The event type information for Channels. */ @Fluent -public final class EventTypeInfo { +public final class EventTypeInfo implements JsonSerializable { /* * The kind of event type used. */ - @JsonProperty(value = "kind") private EventDefinitionKind kind; /* - * A collection of inline event types for the resource. The inline event type keys are of type string which represents the name of the event. + * A collection of inline event types for the resource. The inline event type keys are of type string which + * represents the name of the event. * An example of a valid inline event name is "Contoso.OrderCreated". - * The inline event type values are of type InlineEventProperties and will contain additional information for every inline event type. + * The inline event type values are of type InlineEventProperties and will contain additional information for every + * inline event type. */ - @JsonProperty(value = "inlineEventTypes") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map inlineEventTypes; /** @@ -97,4 +99,46 @@ public void validate() { }); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeMapField("inlineEventTypes", this.inlineEventTypes, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventTypeInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventTypeInfo 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 EventTypeInfo. + */ + public static EventTypeInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventTypeInfo deserializedEventTypeInfo = new EventTypeInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedEventTypeInfo.kind = EventDefinitionKind.fromString(reader.getString()); + } else if ("inlineEventTypes".equals(fieldName)) { + Map inlineEventTypes + = reader.readMap(reader1 -> InlineEventProperties.fromJson(reader1)); + deserializedEventTypeInfo.inlineEventTypes = inlineEventTypes; + } else { + reader.skipChildren(); + } + } + + return deserializedEventTypeInfo; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypesListResult.java index fc81ed537894a..26365e2827ee4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypesListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypesListResult.java @@ -5,19 +5,22 @@ 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.EventTypeInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Event Types operation. */ @Fluent -public final class EventTypesListResult { +public final class EventTypesListResult implements JsonSerializable { /* * A collection of event types */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,41 @@ public void validate() { 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)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventTypesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventTypesListResult 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 EventTypesListResult. + */ + public static EventTypesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventTypesListResult deserializedEventTypesListResult = new EventTypesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> EventTypeInner.fromJson(reader1)); + deserializedEventTypesListResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedEventTypesListResult; + }); + } } 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 index 0380c6184951f..2b261ce176b96 100644 --- 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 @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class ExtendedLocation implements JsonSerializable { /* * Fully qualified name of the extended location. */ - @JsonProperty(value = "name") private String name; /* * Type of the extended location. */ - @JsonProperty(value = "type") private String type; /** @@ -77,4 +79,43 @@ public ExtendedLocation withType(String type) { */ 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 8912614920dfa..2fc22b1930bb4 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/FederatedIdentityCredentialInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FederatedIdentityCredentialInfo.java new file mode 100644 index 0000000000000..24b1dace7ce14 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FederatedIdentityCredentialInfo.java @@ -0,0 +1,108 @@ +// Copyright (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; +import java.util.Objects; +import java.util.UUID; + +/** + * The details of the Federated Identity Credential (FIC) used with the resource. + */ +@Fluent +public final class FederatedIdentityCredentialInfo implements JsonSerializable { + /* + * The Multi-Tenant AAD Application where the Federated Identity Credential (FIC) is associated with. + */ + private UUID federatedClientId; + + /** + * Creates an instance of FederatedIdentityCredentialInfo class. + */ + public FederatedIdentityCredentialInfo() { + } + + /** + * Get the federatedClientId property: The Multi-Tenant AAD Application where the Federated Identity Credential + * (FIC) is associated with. + * + * @return the federatedClientId value. + */ + public UUID federatedClientId() { + return this.federatedClientId; + } + + /** + * Set the federatedClientId property: The Multi-Tenant AAD Application where the Federated Identity Credential + * (FIC) is associated with. + * + * @param federatedClientId the federatedClientId value to set. + * @return the FederatedIdentityCredentialInfo object itself. + */ + public FederatedIdentityCredentialInfo withFederatedClientId(UUID federatedClientId) { + this.federatedClientId = federatedClientId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (federatedClientId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property federatedClientId in model FederatedIdentityCredentialInfo")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FederatedIdentityCredentialInfo.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("federatedClientId", Objects.toString(this.federatedClientId, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FederatedIdentityCredentialInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FederatedIdentityCredentialInfo 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 FederatedIdentityCredentialInfo. + */ + public static FederatedIdentityCredentialInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FederatedIdentityCredentialInfo deserializedFederatedIdentityCredentialInfo + = new FederatedIdentityCredentialInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("federatedClientId".equals(fieldName)) { + deserializedFederatedIdentityCredentialInfo.federatedClientId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedFederatedIdentityCredentialInfo; + }); + } +} 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 e8816e182079b..fda341f5b0850 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 @@ -5,61 +5,34 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * 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. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "operatorType", defaultImpl = Filter.class, visible = true) -@JsonTypeName("Filter") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "NumberIn", value = NumberInFilter.class), - @JsonSubTypes.Type(name = "NumberNotIn", value = NumberNotInFilter.class), - @JsonSubTypes.Type(name = "NumberLessThan", value = NumberLessThanFilter.class), - @JsonSubTypes.Type(name = "NumberGreaterThan", value = NumberGreaterThanFilter.class), - @JsonSubTypes.Type(name = "NumberLessThanOrEquals", value = NumberLessThanOrEqualsFilter.class), - @JsonSubTypes.Type(name = "NumberGreaterThanOrEquals", value = NumberGreaterThanOrEqualsFilter.class), - @JsonSubTypes.Type(name = "BoolEquals", value = BoolEqualsFilter.class), - @JsonSubTypes.Type(name = "StringIn", value = StringInFilter.class), - @JsonSubTypes.Type(name = "StringNotIn", value = StringNotInFilter.class), - @JsonSubTypes.Type(name = "StringBeginsWith", value = StringBeginsWithFilter.class), - @JsonSubTypes.Type(name = "StringEndsWith", value = StringEndsWithFilter.class), - @JsonSubTypes.Type(name = "StringContains", value = StringContainsFilter.class), - @JsonSubTypes.Type(name = "NumberInRange", value = NumberInRangeFilter.class), - @JsonSubTypes.Type(name = "NumberNotInRange", value = NumberNotInRangeFilter.class), - @JsonSubTypes.Type(name = "StringNotBeginsWith", value = StringNotBeginsWithFilter.class), - @JsonSubTypes.Type(name = "StringNotEndsWith", value = StringNotEndsWithFilter.class), - @JsonSubTypes.Type(name = "StringNotContains", value = StringNotContainsFilter.class), - @JsonSubTypes.Type(name = "IsNullOrUndefined", value = IsNullOrUndefinedFilter.class), - @JsonSubTypes.Type(name = "IsNotNull", value = IsNotNullFilter.class) }) @Fluent -public class Filter { +public class Filter implements JsonSerializable { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) - private FilterOperatorType operatorType; + private FilterOperatorType operatorType = FilterOperatorType.fromString("Filter"); /* * The field/property in the event based on which you want to filter. */ - @JsonProperty(value = "key") private String key; /** * Creates an instance of Filter class. */ public Filter() { - this.operatorType = FilterOperatorType.fromString("Filter"); } /** @@ -99,4 +72,104 @@ public Filter withKey(String key) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeStringField("key", this.key); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Filter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Filter 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 Filter. + */ + public static Filter 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 ("operatorType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("NumberIn".equals(discriminatorValue)) { + return NumberInFilter.fromJson(readerToUse.reset()); + } else if ("NumberNotIn".equals(discriminatorValue)) { + return NumberNotInFilter.fromJson(readerToUse.reset()); + } else if ("NumberLessThan".equals(discriminatorValue)) { + return NumberLessThanFilter.fromJson(readerToUse.reset()); + } else if ("NumberGreaterThan".equals(discriminatorValue)) { + return NumberGreaterThanFilter.fromJson(readerToUse.reset()); + } else if ("NumberLessThanOrEquals".equals(discriminatorValue)) { + return NumberLessThanOrEqualsFilter.fromJson(readerToUse.reset()); + } else if ("NumberGreaterThanOrEquals".equals(discriminatorValue)) { + return NumberGreaterThanOrEqualsFilter.fromJson(readerToUse.reset()); + } else if ("BoolEquals".equals(discriminatorValue)) { + return BoolEqualsFilter.fromJson(readerToUse.reset()); + } else if ("StringIn".equals(discriminatorValue)) { + return StringInFilter.fromJson(readerToUse.reset()); + } else if ("StringNotIn".equals(discriminatorValue)) { + return StringNotInFilter.fromJson(readerToUse.reset()); + } else if ("StringBeginsWith".equals(discriminatorValue)) { + return StringBeginsWithFilter.fromJson(readerToUse.reset()); + } else if ("StringEndsWith".equals(discriminatorValue)) { + return StringEndsWithFilter.fromJson(readerToUse.reset()); + } else if ("StringContains".equals(discriminatorValue)) { + return StringContainsFilter.fromJson(readerToUse.reset()); + } else if ("NumberInRange".equals(discriminatorValue)) { + return NumberInRangeFilter.fromJson(readerToUse.reset()); + } else if ("NumberNotInRange".equals(discriminatorValue)) { + return NumberNotInRangeFilter.fromJson(readerToUse.reset()); + } else if ("StringNotBeginsWith".equals(discriminatorValue)) { + return StringNotBeginsWithFilter.fromJson(readerToUse.reset()); + } else if ("StringNotEndsWith".equals(discriminatorValue)) { + return StringNotEndsWithFilter.fromJson(readerToUse.reset()); + } else if ("StringNotContains".equals(discriminatorValue)) { + return StringNotContainsFilter.fromJson(readerToUse.reset()); + } else if ("IsNullOrUndefined".equals(discriminatorValue)) { + return IsNullOrUndefinedFilter.fromJson(readerToUse.reset()); + } else if ("IsNotNull".equals(discriminatorValue)) { + return IsNotNullFilter.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static Filter fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Filter deserializedFilter = new Filter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operatorType".equals(fieldName)) { + deserializedFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("key".equals(fieldName)) { + deserializedFilter.key = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFilter; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FilterOperatorType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FilterOperatorType.java index 95bc7d19169ae..2d820c122e293 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FilterOperatorType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FilterOperatorType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -122,7 +121,6 @@ public FilterOperatorType() { * @param name a name to look for. * @return the corresponding FilterOperatorType. */ - @JsonCreator public static FilterOperatorType fromString(String name) { return fromString(name, FilterOperatorType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FiltersConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FiltersConfiguration.java index a83efc940cd97..1bc8c34bf8921 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FiltersConfiguration.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FiltersConfiguration.java @@ -5,24 +5,27 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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; /** * Filters configuration for the Event Subscription. */ @Fluent -public final class FiltersConfiguration { +public final class FiltersConfiguration implements JsonSerializable { /* - * A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null. + * A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to + * all default event types, set the IncludedEventTypes to null. */ - @JsonProperty(value = "includedEventTypes") private List includedEventTypes; /* * An array of filters that are used for filtering event subscriptions. */ - @JsonProperty(value = "filters") private List filters; /** @@ -83,4 +86,46 @@ public void validate() { filters().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("includedEventTypes", this.includedEventTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("filters", this.filters, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FiltersConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FiltersConfiguration 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 FiltersConfiguration. + */ + public static FiltersConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FiltersConfiguration deserializedFiltersConfiguration = new FiltersConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("includedEventTypes".equals(fieldName)) { + List includedEventTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedFiltersConfiguration.includedEventTypes = includedEventTypes; + } else if ("filters".equals(fieldName)) { + List filters = reader.readArray(reader1 -> Filter.fromJson(reader1)); + deserializedFiltersConfiguration.filters = filters; + } else { + reader.skipChildren(); + } + } + + return deserializedFiltersConfiguration; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/HybridConnectionEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/HybridConnectionEventSubscriptionDestination.java index dc2d1eb90fb25..f6b688a84dd29 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/HybridConnectionEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/HybridConnectionEventSubscriptionDestination.java @@ -5,35 +5,26 @@ 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.HybridConnectionEventSubscriptionDestinationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; import java.util.List; /** * Information about the HybridConnection destination for an event subscription. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = HybridConnectionEventSubscriptionDestination.class, - visible = true) -@JsonTypeName("HybridConnection") @Fluent public final class HybridConnectionEventSubscriptionDestination extends EventSubscriptionDestination { /* * Type of the endpoint for the event subscription destination. */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private EndpointType endpointType = EndpointType.HYBRID_CONNECTION; /* * Hybrid connection Properties of the event subscription destination. */ - @JsonProperty(value = "properties") private HybridConnectionEventSubscriptionDestinationProperties innerProperties; /** @@ -117,9 +108,50 @@ public List deliveryAttributeMappings() { */ @Override public void validate() { - super.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 HybridConnectionEventSubscriptionDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HybridConnectionEventSubscriptionDestination 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 HybridConnectionEventSubscriptionDestination. + */ + public static HybridConnectionEventSubscriptionDestination fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HybridConnectionEventSubscriptionDestination deserializedHybridConnectionEventSubscriptionDestination + = new HybridConnectionEventSubscriptionDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedHybridConnectionEventSubscriptionDestination.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedHybridConnectionEventSubscriptionDestination.innerProperties + = HybridConnectionEventSubscriptionDestinationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedHybridConnectionEventSubscriptionDestination; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityInfo.java index 9b3a41a9ed802..ed6d4b95a4912 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityInfo.java @@ -5,40 +5,41 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import 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; /** * The identity information for the resource. */ @Fluent -public final class IdentityInfo { +public final class IdentityInfo implements JsonSerializable { /* - * The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identity. + * The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created + * identity and a set of user-assigned identities. The type 'None' will remove any identity. */ - @JsonProperty(value = "type") private IdentityType type; /* * The principal ID of resource identity. */ - @JsonProperty(value = "principalId") private String principalId; /* * The tenant ID of resource. */ - @JsonProperty(value = "tenantId") private String tenantId; /* - * The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * The list of user identities associated with the resource. The user identity dictionary key references will be ARM + * resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}'. * This property is currently not used and reserved for future usage. */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; /** @@ -149,4 +150,52 @@ public void validate() { }); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("principalId", this.principalId); + jsonWriter.writeStringField("tenantId", this.tenantId); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityInfo 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 IdentityInfo. + */ + public static IdentityInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityInfo deserializedIdentityInfo = new IdentityInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedIdentityInfo.type = IdentityType.fromString(reader.getString()); + } else if ("principalId".equals(fieldName)) { + deserializedIdentityInfo.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedIdentityInfo.tenantId = reader.getString(); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserIdentityProperties.fromJson(reader1)); + deserializedIdentityInfo.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityInfo; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityType.java index bf98a6a43fb77..b1ff0748efb9f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -48,7 +47,6 @@ public IdentityType() { * @param name a name to look for. * @return the corresponding IdentityType. */ - @JsonCreator public static IdentityType fromString(String name) { return fromString(name, IdentityType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InboundIpRule.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InboundIpRule.java index 6cb8a76eb697b..fc23ee63fc638 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InboundIpRule.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InboundIpRule.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 InboundIpRule model. */ @Fluent -public final class InboundIpRule { +public final class InboundIpRule implements JsonSerializable { /* * IP Address in CIDR notation e.g., 10.0.0.0/8. */ - @JsonProperty(value = "ipMask") private String ipMask; /* * Action to perform based on the match or no match of the IpMask. */ - @JsonProperty(value = "action") private IpActionType action; /** @@ -77,4 +79,43 @@ public InboundIpRule withAction(IpActionType action) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipMask", this.ipMask); + jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InboundIpRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InboundIpRule 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 InboundIpRule. + */ + public static InboundIpRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InboundIpRule deserializedInboundIpRule = new InboundIpRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipMask".equals(fieldName)) { + deserializedInboundIpRule.ipMask = reader.getString(); + } else if ("action".equals(fieldName)) { + deserializedInboundIpRule.action = IpActionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInboundIpRule; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InlineEventProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InlineEventProperties.java index cc21ed1742f54..342e552e568b5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InlineEventProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InlineEventProperties.java @@ -5,35 +5,35 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Additional information about every inline event. */ @Fluent -public final class InlineEventProperties { +public final class InlineEventProperties implements JsonSerializable { /* * The description for the inline event. */ - @JsonProperty(value = "description") private String description; /* * The displayName for the inline event. */ - @JsonProperty(value = "displayName") private String displayName; /* * The documentationUrl for the inline event. */ - @JsonProperty(value = "documentationUrl") private String documentationUrl; /* * The dataSchemaUrl for the inline event. */ - @JsonProperty(value = "dataSchemaUrl") private String dataSchemaUrl; /** @@ -129,4 +129,49 @@ public InlineEventProperties withDataSchemaUrl(String dataSchemaUrl) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("documentationUrl", this.documentationUrl); + jsonWriter.writeStringField("dataSchemaUrl", this.dataSchemaUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InlineEventProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InlineEventProperties 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 InlineEventProperties. + */ + public static InlineEventProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InlineEventProperties deserializedInlineEventProperties = new InlineEventProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedInlineEventProperties.description = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedInlineEventProperties.displayName = reader.getString(); + } else if ("documentationUrl".equals(fieldName)) { + deserializedInlineEventProperties.documentationUrl = reader.getString(); + } else if ("dataSchemaUrl".equals(fieldName)) { + deserializedInlineEventProperties.dataSchemaUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInlineEventProperties; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchema.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchema.java index 8fdde78f6cc01..245788fffb209 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchema.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchema.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -43,7 +42,6 @@ public InputSchema() { * @param name a name to look for. * @return the corresponding InputSchema. */ - @JsonCreator public static InputSchema fromString(String name) { return fromString(name, InputSchema.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMapping.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMapping.java index f10855294f364..3ac9be76e0d15 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMapping.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMapping.java @@ -5,38 +5,28 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * By default, Event Grid expects events to be in the Event Grid event schema. Specifying an input schema mapping * enables publishing to Event Grid using a custom input schema. Currently, the only supported type of * InputSchemaMapping is 'JsonInputSchemaMapping'. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "inputSchemaMappingType", - defaultImpl = InputSchemaMapping.class, - visible = true) -@JsonTypeName("InputSchemaMapping") -@JsonSubTypes({ @JsonSubTypes.Type(name = "Json", value = JsonInputSchemaMapping.class) }) @Immutable -public class InputSchemaMapping { +public class InputSchemaMapping implements JsonSerializable { /* * Type of the custom mapping */ - @JsonTypeId - @JsonProperty(value = "inputSchemaMappingType", required = true) - private InputSchemaMappingType inputSchemaMappingType; + private InputSchemaMappingType inputSchemaMappingType = InputSchemaMappingType.fromString("InputSchemaMapping"); /** * Creates an instance of InputSchemaMapping class. */ public InputSchemaMapping() { - this.inputSchemaMappingType = InputSchemaMappingType.fromString("InputSchemaMapping"); } /** @@ -55,4 +45,67 @@ public InputSchemaMappingType inputSchemaMappingType() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("inputSchemaMappingType", + this.inputSchemaMappingType == null ? null : this.inputSchemaMappingType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InputSchemaMapping from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InputSchemaMapping 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 InputSchemaMapping. + */ + public static InputSchemaMapping 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 ("inputSchemaMappingType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Json".equals(discriminatorValue)) { + return JsonInputSchemaMapping.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static InputSchemaMapping fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InputSchemaMapping deserializedInputSchemaMapping = new InputSchemaMapping(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("inputSchemaMappingType".equals(fieldName)) { + deserializedInputSchemaMapping.inputSchemaMappingType + = InputSchemaMappingType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInputSchemaMapping; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMappingType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMappingType.java index f26377e967a6e..7f96a63bddd33 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMappingType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMappingType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public InputSchemaMappingType() { * @param name a name to look for. * @return the corresponding InputSchemaMappingType. */ - @JsonCreator public static InputSchemaMappingType fromString(String name) { return fromString(name, InputSchemaMappingType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpActionType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpActionType.java index 7deea5c859334..b5efc61cbb035 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpActionType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpActionType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public IpActionType() { * @param name a name to look for. * @return the corresponding IpActionType. */ - @JsonCreator public static IpActionType fromString(String name) { return fromString(name, IpActionType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullAdvancedFilter.java index 784b2d0851bfa..18dd115046549 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullAdvancedFilter.java @@ -5,27 +5,19 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * IsNotNull Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = IsNotNullAdvancedFilter.class, - visible = true) -@JsonTypeName("IsNotNull") @Fluent public final class IsNotNullAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.IS_NOT_NULL; /** @@ -61,6 +53,45 @@ public IsNotNullAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IsNotNullAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IsNotNullAdvancedFilter 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 IsNotNullAdvancedFilter. + */ + public static IsNotNullAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IsNotNullAdvancedFilter deserializedIsNotNullAdvancedFilter = new IsNotNullAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedIsNotNullAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedIsNotNullAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedIsNotNullAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullFilter.java index 848834bc37422..36c8ba03c23c0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullFilter.java @@ -5,27 +5,19 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * IsNotNull Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = IsNotNullFilter.class, - visible = true) -@JsonTypeName("IsNotNull") @Fluent public final class IsNotNullFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.IS_NOT_NULL; /** @@ -61,6 +53,44 @@ public IsNotNullFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IsNotNullFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IsNotNullFilter 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 IsNotNullFilter. + */ + public static IsNotNullFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IsNotNullFilter deserializedIsNotNullFilter = new IsNotNullFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedIsNotNullFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedIsNotNullFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedIsNotNullFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedAdvancedFilter.java index 20997dd2d87ca..7e345d2b39175 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedAdvancedFilter.java @@ -5,27 +5,19 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * IsNullOrUndefined Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = IsNullOrUndefinedAdvancedFilter.class, - visible = true) -@JsonTypeName("IsNullOrUndefined") @Fluent public final class IsNullOrUndefinedAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.IS_NULL_OR_UNDEFINED; /** @@ -61,6 +53,46 @@ public IsNullOrUndefinedAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IsNullOrUndefinedAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IsNullOrUndefinedAdvancedFilter 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 IsNullOrUndefinedAdvancedFilter. + */ + public static IsNullOrUndefinedAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IsNullOrUndefinedAdvancedFilter deserializedIsNullOrUndefinedAdvancedFilter + = new IsNullOrUndefinedAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedIsNullOrUndefinedAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedIsNullOrUndefinedAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedIsNullOrUndefinedAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedFilter.java index 3919003eb9998..ddddd9d7d5da2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedFilter.java @@ -5,27 +5,19 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * IsNullOrUndefined Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = IsNullOrUndefinedFilter.class, - visible = true) -@JsonTypeName("IsNullOrUndefined") @Fluent public final class IsNullOrUndefinedFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.IS_NULL_OR_UNDEFINED; /** @@ -61,6 +53,45 @@ public IsNullOrUndefinedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IsNullOrUndefinedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IsNullOrUndefinedFilter 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 IsNullOrUndefinedFilter. + */ + public static IsNullOrUndefinedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IsNullOrUndefinedFilter deserializedIsNullOrUndefinedFilter = new IsNullOrUndefinedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedIsNullOrUndefinedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedIsNullOrUndefinedFilter.operatorType + = FilterOperatorType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedIsNullOrUndefinedFilter; + }); } } 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 index fa031a7343c7c..e6733175a04b4 100644 --- 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 @@ -6,23 +6,26 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class IssuerCertificateInfo implements JsonSerializable { /* - * Keyvault certificate URL in https://keyvaultname.vault.azure.net/certificates/certificateName/certificateVersion format. + * Keyvault certificate URL in https://keyvaultname.vault.azure.net/certificates/certificateName/certificateVersion + * format. */ - @JsonProperty(value = "certificateUrl", required = true) private String certificateUrl; /* * The identity that will be used to access the certificate. */ - @JsonProperty(value = "identity") private CustomJwtAuthenticationManagedIdentity identity; /** @@ -90,4 +93,45 @@ public void 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/JsonField.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonField.java index 1cf3ab14120cc..3437e74e16c71 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonField.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonField.java @@ -5,7 +5,11 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * This is used to express the source of an input schema mapping for a single target field in the Event Grid Event @@ -13,11 +17,10 @@ * field in the input event schema. */ @Fluent -public final class JsonField { +public final class JsonField implements JsonSerializable { /* * Name of a field in the input event schema that's to be used as the source of a mapping. */ - @JsonProperty(value = "sourceField") private String sourceField; /** @@ -55,4 +58,40 @@ public JsonField withSourceField(String sourceField) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceField", this.sourceField); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JsonField from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JsonField 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 JsonField. + */ + public static JsonField fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JsonField deserializedJsonField = new JsonField(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceField".equals(fieldName)) { + deserializedJsonField.sourceField = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJsonField; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonFieldWithDefault.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonFieldWithDefault.java index b05e05136259b..9646c040fde1d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonFieldWithDefault.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonFieldWithDefault.java @@ -5,7 +5,11 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * This is used to express the source of an input schema mapping for a single target field @@ -14,17 +18,16 @@ * along with a default value to be used, and at least one of these two properties should be provided. */ @Fluent -public final class JsonFieldWithDefault { +public final class JsonFieldWithDefault implements JsonSerializable { /* * Name of a field in the input event schema that's to be used as the source of a mapping. */ - @JsonProperty(value = "sourceField") private String sourceField; /* - * The default value to be used for mapping when a SourceField is not provided or if there's no property with the specified name in the published JSON event payload. + * The default value to be used for mapping when a SourceField is not provided or if there's no property with the + * specified name in the published JSON event payload. */ - @JsonProperty(value = "defaultValue") private String defaultValue; /** @@ -84,4 +87,43 @@ public JsonFieldWithDefault withDefaultValue(String defaultValue) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceField", this.sourceField); + jsonWriter.writeStringField("defaultValue", this.defaultValue); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JsonFieldWithDefault from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JsonFieldWithDefault 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 JsonFieldWithDefault. + */ + public static JsonFieldWithDefault fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JsonFieldWithDefault deserializedJsonFieldWithDefault = new JsonFieldWithDefault(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceField".equals(fieldName)) { + deserializedJsonFieldWithDefault.sourceField = reader.getString(); + } else if ("defaultValue".equals(fieldName)) { + deserializedJsonFieldWithDefault.defaultValue = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJsonFieldWithDefault; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonInputSchemaMapping.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonInputSchemaMapping.java index 7ea6cc3ed9cdf..85fe4e201e5cd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonInputSchemaMapping.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonInputSchemaMapping.java @@ -5,35 +5,26 @@ 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.JsonInputSchemaMappingProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; /** * This enables publishing to Event Grid using a custom input schema. This can be used to map properties from a custom * input JSON schema to the Event Grid event schema. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "inputSchemaMappingType", - defaultImpl = JsonInputSchemaMapping.class, - visible = true) -@JsonTypeName("Json") @Fluent public final class JsonInputSchemaMapping extends InputSchemaMapping { /* * Type of the custom mapping */ - @JsonTypeId - @JsonProperty(value = "inputSchemaMappingType", required = true) private InputSchemaMappingType inputSchemaMappingType = InputSchemaMappingType.JSON; /* * JSON Properties of the input schema mapping */ - @JsonProperty(value = "properties") private JsonInputSchemaMappingProperties innerProperties; /** @@ -206,9 +197,50 @@ public JsonInputSchemaMapping withDataVersion(JsonFieldWithDefault dataVersion) */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("inputSchemaMappingType", + this.inputSchemaMappingType == null ? null : this.inputSchemaMappingType.toString()); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JsonInputSchemaMapping from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JsonInputSchemaMapping 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 JsonInputSchemaMapping. + */ + public static JsonInputSchemaMapping fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JsonInputSchemaMapping deserializedJsonInputSchemaMapping = new JsonInputSchemaMapping(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("inputSchemaMappingType".equals(fieldName)) { + deserializedJsonInputSchemaMapping.inputSchemaMappingType + = InputSchemaMappingType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedJsonInputSchemaMapping.innerProperties + = JsonInputSchemaMappingProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJsonInputSchemaMapping; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/MonitorAlertEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/MonitorAlertEventSubscriptionDestination.java index 610eb63f38311..990172668dc75 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/MonitorAlertEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/MonitorAlertEventSubscriptionDestination.java @@ -5,35 +5,26 @@ 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.MonitorAlertEventSubscriptionDestinationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; import java.util.List; /** * Information about the Monitor Alert destination for an event subscription. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = MonitorAlertEventSubscriptionDestination.class, - visible = true) -@JsonTypeName("MonitorAlert") @Fluent public final class MonitorAlertEventSubscriptionDestination extends EventSubscriptionDestination { /* * Type of the endpoint for the event subscription destination. */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private EndpointType endpointType = EndpointType.MONITOR_ALERT; /* * Monitor Alert properties of the event subscription destination. */ - @JsonProperty(value = "properties") private MonitorAlertEventSubscriptionDestinationProperties innerProperties; /** @@ -149,9 +140,50 @@ public MonitorAlertEventSubscriptionDestination withActionGroups(List ac */ @Override public void validate() { - super.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 MonitorAlertEventSubscriptionDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitorAlertEventSubscriptionDestination 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 MonitorAlertEventSubscriptionDestination. + */ + public static MonitorAlertEventSubscriptionDestination fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitorAlertEventSubscriptionDestination deserializedMonitorAlertEventSubscriptionDestination + = new MonitorAlertEventSubscriptionDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedMonitorAlertEventSubscriptionDestination.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedMonitorAlertEventSubscriptionDestination.innerProperties + = MonitorAlertEventSubscriptionDestinationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitorAlertEventSubscriptionDestination; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/MonitorAlertSeverity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/MonitorAlertSeverity.java index 6e08419e49069..c2023e0bf71c2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/MonitorAlertSeverity.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/MonitorAlertSeverity.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -53,7 +52,6 @@ public MonitorAlertSeverity() { * @param name a name to look for. * @return the corresponding MonitorAlertSeverity. */ - @JsonCreator public static MonitorAlertSeverity fromString(String name) { return fromString(name, MonitorAlertSeverity.class); } 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 997d326ec6bb9..15f3353a4284b 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/NamespaceProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceProvisioningState.java index 2b75734407740..a9c8c5695c212 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -77,7 +76,6 @@ public NamespaceProvisioningState() { * @param name a name to look for. * @return the corresponding NamespaceProvisioningState. */ - @JsonCreator public static NamespaceProvisioningState fromString(String name) { return fromString(name, NamespaceProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceRegenerateKeyRequest.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceRegenerateKeyRequest.java index a4d146ed10238..2095601532897 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceRegenerateKeyRequest.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceRegenerateKeyRequest.java @@ -6,17 +6,20 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Namespace regenerate share access key request. */ @Fluent -public final class NamespaceRegenerateKeyRequest { +public final class NamespaceRegenerateKeyRequest implements JsonSerializable { /* * Key name to regenerate key1 or key2. */ - @JsonProperty(value = "keyName", required = true) private String keyName; /** @@ -59,4 +62,42 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(NamespaceRegenerateKeyRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyName", this.keyName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NamespaceRegenerateKeyRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceRegenerateKeyRequest 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 NamespaceRegenerateKeyRequest. + */ + public static NamespaceRegenerateKeyRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceRegenerateKeyRequest deserializedNamespaceRegenerateKeyRequest + = new NamespaceRegenerateKeyRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyName".equals(fieldName)) { + deserializedNamespaceRegenerateKeyRequest.keyName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceRegenerateKeyRequest; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSku.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSku.java index da0e676a02f34..1271bdb5717fd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSku.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSku.java @@ -5,25 +5,28 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Represents available Sku pricing tiers. */ @Fluent -public final class NamespaceSku { +public final class NamespaceSku implements JsonSerializable { /* * The name of the SKU. */ - @JsonProperty(value = "name") private SkuName name; /* - * Specifies the number of Throughput Units that defines the capacity for the namespace. The property default value is + * Specifies the number of Throughput Units that defines the capacity for the namespace. The property default value + * is * 1 which signifies 1 Throughput Unit = 1MB/s ingress and 2MB/s egress per namespace. Min capacity is 1 and * max allowed capacity is 20. */ - @JsonProperty(value = "capacity") private Integer capacity; /** @@ -85,4 +88,43 @@ public NamespaceSku withCapacity(Integer capacity) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); + jsonWriter.writeNumberField("capacity", this.capacity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NamespaceSku from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceSku 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 NamespaceSku. + */ + public static NamespaceSku fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceSku deserializedNamespaceSku = new NamespaceSku(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedNamespaceSku.name = SkuName.fromString(reader.getString()); + } else if ("capacity".equals(fieldName)) { + deserializedNamespaceSku.capacity = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceSku; + }); + } } 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 3dac4ca32d3b2..dec28d601ac4a 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/NamespaceTopicEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptionDestination.java index db5af6a35e672..9c10b193ef655 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptionDestination.java @@ -5,34 +5,25 @@ 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.NamespaceTopicEventSubscriptionDestinationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; /** * Information about the Namespace Topic destination for an event subscription. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = NamespaceTopicEventSubscriptionDestination.class, - visible = true) -@JsonTypeName("NamespaceTopic") @Fluent public final class NamespaceTopicEventSubscriptionDestination extends EventSubscriptionDestination { /* * Type of the endpoint for the event subscription destination. */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private EndpointType endpointType = EndpointType.NAMESPACE_TOPIC; /* * Namespace Topic properties of the event subscription destination. */ - @JsonProperty(value = "properties") private NamespaceTopicEventSubscriptionDestinationProperties innerProperties; /** @@ -98,9 +89,50 @@ public NamespaceTopicEventSubscriptionDestination withResourceId(String resource */ @Override public void validate() { - super.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 NamespaceTopicEventSubscriptionDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceTopicEventSubscriptionDestination 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 NamespaceTopicEventSubscriptionDestination. + */ + public static NamespaceTopicEventSubscriptionDestination fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceTopicEventSubscriptionDestination deserializedNamespaceTopicEventSubscriptionDestination + = new NamespaceTopicEventSubscriptionDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedNamespaceTopicEventSubscriptionDestination.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedNamespaceTopicEventSubscriptionDestination.innerProperties + = NamespaceTopicEventSubscriptionDestinationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceTopicEventSubscriptionDestination; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicProvisioningState.java index ea682efac813f..7397d68e06110 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -77,7 +76,6 @@ public NamespaceTopicProvisioningState() { * @param name a name to look for. * @return the corresponding NamespaceTopicProvisioningState. */ - @JsonCreator public static NamespaceTopicProvisioningState fromString(String name) { return fromString(name, NamespaceTopicProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicUpdateParameters.java index c3137e26242f8..b0af7b0c9be2d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicUpdateParameters.java @@ -5,18 +5,21 @@ 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.NamespaceTopicUpdateParameterProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Properties of the namespace topic update. */ @Fluent -public final class NamespaceTopicUpdateParameters { +public final class NamespaceTopicUpdateParameters implements JsonSerializable { /* * Properties of the namespace topic resource. */ - @JsonProperty(value = "properties") private NamespaceTopicUpdateParameterProperties innerProperties; /** @@ -71,4 +74,42 @@ public void validate() { 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 NamespaceTopicUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceTopicUpdateParameters 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 NamespaceTopicUpdateParameters. + */ + public static NamespaceTopicUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceTopicUpdateParameters deserializedNamespaceTopicUpdateParameters + = new NamespaceTopicUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedNamespaceTopicUpdateParameters.innerProperties + = NamespaceTopicUpdateParameterProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceTopicUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicsListResult.java index 4f3a19c3c4d2c..5b56270e99f42 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicsListResult.java @@ -5,25 +5,27 @@ 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.NamespaceTopicInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List namespace topics operation. */ @Fluent -public final class NamespaceTopicsListResult { +public final class NamespaceTopicsListResult implements JsonSerializable { /* * A collection of namespace topics. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of namespace topics. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,45 @@ public void validate() { 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 NamespaceTopicsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceTopicsListResult 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 NamespaceTopicsListResult. + */ + public static NamespaceTopicsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceTopicsListResult deserializedNamespaceTopicsListResult = new NamespaceTopicsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NamespaceTopicInner.fromJson(reader1)); + deserializedNamespaceTopicsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNamespaceTopicsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceTopicsListResult; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceUpdateParameters.java index 78d3b8107fdb8..99ba80c5dd813 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceUpdateParameters.java @@ -5,9 +5,12 @@ 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.NamespaceUpdateParameterProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -15,30 +18,25 @@ * Properties to update namespace. */ @Fluent -public final class NamespaceUpdateParameters { +public final class NamespaceUpdateParameters implements JsonSerializable { /* * Tags of the namespace resource. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Namespace resource identity information. */ - @JsonProperty(value = "identity") private IdentityInfo identity; /* * Represents available Sku pricing tiers. */ - @JsonProperty(value = "sku") private NamespaceSku sku; /* * Properties of the namespace resource. */ - @JsonProperty(value = "properties") private NamespaceUpdateParameterProperties innerProperties; /** @@ -235,4 +233,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NamespaceUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceUpdateParameters 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 NamespaceUpdateParameters. + */ + public static NamespaceUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceUpdateParameters deserializedNamespaceUpdateParameters = new NamespaceUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNamespaceUpdateParameters.tags = tags; + } else if ("identity".equals(fieldName)) { + deserializedNamespaceUpdateParameters.identity = IdentityInfo.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedNamespaceUpdateParameters.sku = NamespaceSku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedNamespaceUpdateParameters.innerProperties + = NamespaceUpdateParameterProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespacesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespacesListResult.java index 7e200afd6af6c..0f3d637e76c61 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespacesListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespacesListResult.java @@ -5,25 +5,27 @@ 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.NamespaceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Namespaces operation. */ @Fluent -public final class NamespacesListResult { +public final class NamespacesListResult implements JsonSerializable { /* * A collection of namespaces. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of namespaces. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 NamespacesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespacesListResult 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 NamespacesListResult. + */ + public static NamespacesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespacesListResult deserializedNamespacesListResult = new NamespacesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> NamespaceInner.fromJson(reader1)); + deserializedNamespacesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNamespacesListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespacesListResult; + }); + } } 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 index 35364ce26fcc2..5c3ff202f211a 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -43,7 +42,6 @@ public NetworkSecurityPerimeterAssociationAccessMode() { * @param name a name to look for. * @return the corresponding NetworkSecurityPerimeterAssociationAccessMode. */ - @JsonCreator public static NetworkSecurityPerimeterAssociationAccessMode fromString(String name) { return fromString(name, 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 index 04356bdfe7f0c..f7e337d512d46 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -68,7 +67,6 @@ public NetworkSecurityPerimeterConfigProvisioningState() { * @param name a name to look for. * @return the corresponding NetworkSecurityPerimeterConfigProvisioningState. */ - @JsonCreator public static NetworkSecurityPerimeterConfigProvisioningState fromString(String name) { return fromString(name, NetworkSecurityPerimeterConfigProvisioningState.class); } 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 index 9236a7d9e6cd0..11c64d814fcf8 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -38,7 +37,6 @@ public NetworkSecurityPerimeterConfigurationIssueSeverity() { * @param name a name to look for. * @return the corresponding NetworkSecurityPerimeterConfigurationIssueSeverity. */ - @JsonCreator public static NetworkSecurityPerimeterConfigurationIssueSeverity fromString(String name) { return fromString(name, 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 index 2ba985b2fbdcd..69d011ccc6969 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -51,7 +50,6 @@ public NetworkSecurityPerimeterConfigurationIssueType() { * @param name a name to look for. * @return the corresponding NetworkSecurityPerimeterConfigurationIssueType. */ - @JsonCreator public static NetworkSecurityPerimeterConfigurationIssueType fromString(String name) { return fromString(name, 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 index ab8b0f601d88c..1e68f92a704ed 100644 --- 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 @@ -5,25 +5,28 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Network security perimeter configuration issues. */ @Fluent -public final class NetworkSecurityPerimeterConfigurationIssues { +public final class NetworkSecurityPerimeterConfigurationIssues + implements JsonSerializable { /* * Provisioning issue name. */ - @JsonProperty(value = "name") private String name; /* * Provisioning issue properties. */ - @JsonProperty(value = "properties") private NetworkSecurityPerimeterConfigurationIssuesProperties innerProperties; /** @@ -190,4 +193,45 @@ public void validate() { 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 index 93878c019f737..a5da4ee091f19 100644 --- 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 @@ -5,25 +5,28 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Network security perimeter configuration List. */ @Fluent -public final class NetworkSecurityPerimeterConfigurationList { +public final class NetworkSecurityPerimeterConfigurationList + implements JsonSerializable { /* * List of all network security parameter configurations. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of Network Security Perimeter Configuration. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +85,46 @@ public void validate() { 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 index 2645eea4d7f02..dbc4f2bdcc59c 100644 --- 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 @@ -5,42 +5,42 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class NetworkSecurityPerimeterConfigurationProfile + implements JsonSerializable { /* * Nsp configuration profile name. */ - @JsonProperty(value = "name") private String name; /* * Access rules version number for nsp profile. */ - @JsonProperty(value = "accessRulesVersion") private String accessRulesVersion; /* * List of inbound or outbound access rule setup on the nsp profile. */ - @JsonProperty(value = "accessRules") private List accessRules; /* * Diagnostic settings version number for nsp profile. */ - @JsonProperty(value = "diagnosticSettingsVersion") private String diagnosticSettingsVersion; /* * Enabled log categories for nsp profile. */ - @JsonProperty(value = "enabledLogCategories") private List enabledLogCategories; /** @@ -161,4 +161,59 @@ public void validate() { 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/NetworkSecurityPerimeterInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterInfo.java index 414a1980f3beb..41fad643253f7 100644 --- 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 @@ -5,29 +5,30 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class NetworkSecurityPerimeterInfo implements JsonSerializable { /* * Arm id for network security perimeter. */ - @JsonProperty(value = "id") private String id; /* * Network security perimeter guid. */ - @JsonProperty(value = "perimeterGuid") private String perimeterGuid; /* * Network security perimeter location. */ - @JsonProperty(value = "location") private String location; /** @@ -103,4 +104,46 @@ public NetworkSecurityPerimeterInfo withLocation(String location) { */ 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 index 4d4164e02ce0c..22666729e5da8 100644 --- 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 @@ -5,37 +5,38 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Network security perimeter profile access rule. */ @Fluent -public final class NetworkSecurityPerimeterProfileAccessRule { +public final class NetworkSecurityPerimeterProfileAccessRule + implements JsonSerializable { /* * Fully Qualified Arm id for network security perimeter profile access rule. */ - @JsonProperty(value = "fullyQualifiedArmId") private String fullyQualifiedArmId; /* * Name for nsp access rule. */ - @JsonProperty(value = "name") private String name; /* * nsp access rule type. */ - @JsonProperty(value = "type") private String type; /* * NSP access rule properties. */ - @JsonProperty(value = "properties") private NetworkSecurityPerimeterProfileAccessRuleProperties innerProperties; /** @@ -288,4 +289,51 @@ public void validate() { 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 index 969607332f984..5261b6371258d 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -38,7 +37,6 @@ public NetworkSecurityPerimeterProfileAccessRuleDirection() { * @param name a name to look for. * @return the corresponding NetworkSecurityPerimeterProfileAccessRuleDirection. */ - @JsonCreator public static NetworkSecurityPerimeterProfileAccessRuleDirection fromString(String name) { return fromString(name, 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 index 0b8ba0b674fe7..0ea56f24cc477 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -38,7 +37,6 @@ public NetworkSecurityPerimeterResourceType() { * @param name a name to look for. * @return the corresponding NetworkSecurityPerimeterResourceType. */ - @JsonCreator public static NetworkSecurityPerimeterResourceType fromString(String name) { return fromString(name, 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 index 21a116d745640..e95dc426a10a3 100644 --- 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 @@ -5,17 +5,21 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class NetworkSecurityPerimeterSubscription + implements JsonSerializable { /* * Subscription id. */ - @JsonProperty(value = "id") private String id; /** @@ -51,4 +55,41 @@ public NetworkSecurityPerimeterSubscription withId(String id) { */ 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/NumberGreaterThanAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanAdvancedFilter.java index b31d3e350dc84..00e6f4af89e73 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanAdvancedFilter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * NumberGreaterThan Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberGreaterThanAdvancedFilter.class, - visible = true) -@JsonTypeName("NumberGreaterThan") @Fluent public final class NumberGreaterThanAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.NUMBER_GREATER_THAN; /* * The filter value. */ - @JsonProperty(value = "value") private Double value; /** @@ -87,6 +78,49 @@ public NumberGreaterThanAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeNumberField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberGreaterThanAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberGreaterThanAdvancedFilter 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 NumberGreaterThanAdvancedFilter. + */ + public static NumberGreaterThanAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberGreaterThanAdvancedFilter deserializedNumberGreaterThanAdvancedFilter + = new NumberGreaterThanAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberGreaterThanAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberGreaterThanAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedNumberGreaterThanAdvancedFilter.value = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedNumberGreaterThanAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanFilter.java index 6f0827c25b049..7d212310c2ff5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanFilter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * NumberGreaterThan Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberGreaterThanFilter.class, - visible = true) -@JsonTypeName("NumberGreaterThan") @Fluent public final class NumberGreaterThanFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.NUMBER_GREATER_THAN; /* * The filter value. */ - @JsonProperty(value = "value") private Double value; /** @@ -87,6 +78,48 @@ public NumberGreaterThanFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeNumberField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberGreaterThanFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberGreaterThanFilter 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 NumberGreaterThanFilter. + */ + public static NumberGreaterThanFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberGreaterThanFilter deserializedNumberGreaterThanFilter = new NumberGreaterThanFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberGreaterThanFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberGreaterThanFilter.operatorType + = FilterOperatorType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedNumberGreaterThanFilter.value = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedNumberGreaterThanFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsAdvancedFilter.java index 06071dbe2c0e9..a99e3beb889e6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsAdvancedFilter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * NumberGreaterThanOrEquals Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberGreaterThanOrEqualsAdvancedFilter.class, - visible = true) -@JsonTypeName("NumberGreaterThanOrEquals") @Fluent public final class NumberGreaterThanOrEqualsAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.NUMBER_GREATER_THAN_OR_EQUALS; /* * The filter value. */ - @JsonProperty(value = "value") private Double value; /** @@ -87,6 +78,50 @@ public NumberGreaterThanOrEqualsAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeNumberField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberGreaterThanOrEqualsAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberGreaterThanOrEqualsAdvancedFilter 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 NumberGreaterThanOrEqualsAdvancedFilter. + */ + public static NumberGreaterThanOrEqualsAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberGreaterThanOrEqualsAdvancedFilter deserializedNumberGreaterThanOrEqualsAdvancedFilter + = new NumberGreaterThanOrEqualsAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberGreaterThanOrEqualsAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberGreaterThanOrEqualsAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedNumberGreaterThanOrEqualsAdvancedFilter.value + = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedNumberGreaterThanOrEqualsAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsFilter.java index 0474fc16d448c..2ecbdf2eb49f4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsFilter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * NumberGreaterThanOrEquals Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberGreaterThanOrEqualsFilter.class, - visible = true) -@JsonTypeName("NumberGreaterThanOrEquals") @Fluent public final class NumberGreaterThanOrEqualsFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.NUMBER_GREATER_THAN_OR_EQUALS; /* * The filter value. */ - @JsonProperty(value = "value") private Double value; /** @@ -87,6 +78,49 @@ public NumberGreaterThanOrEqualsFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeNumberField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberGreaterThanOrEqualsFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberGreaterThanOrEqualsFilter 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 NumberGreaterThanOrEqualsFilter. + */ + public static NumberGreaterThanOrEqualsFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberGreaterThanOrEqualsFilter deserializedNumberGreaterThanOrEqualsFilter + = new NumberGreaterThanOrEqualsFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberGreaterThanOrEqualsFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberGreaterThanOrEqualsFilter.operatorType + = FilterOperatorType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedNumberGreaterThanOrEqualsFilter.value = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedNumberGreaterThanOrEqualsFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInAdvancedFilter.java index e394cd006b100..df80fb997cbb0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * NumberIn Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberInAdvancedFilter.class, - visible = true) -@JsonTypeName("NumberIn") @Fluent public final class NumberInAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.NUMBER_IN; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,49 @@ public NumberInAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeDouble(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberInAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberInAdvancedFilter 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 NumberInAdvancedFilter. + */ + public static NumberInAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberInAdvancedFilter deserializedNumberInAdvancedFilter = new NumberInAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberInAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberInAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getDouble()); + deserializedNumberInAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedNumberInAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInFilter.java index 8e44cabc52c85..5de876abf5098 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInFilter.java @@ -5,30 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * NumberIn Filter. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "operatorType", defaultImpl = NumberInFilter.class, visible = true) -@JsonTypeName("NumberIn") @Fluent public final class NumberInFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.NUMBER_IN; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -84,6 +79,48 @@ public NumberInFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeDouble(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberInFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberInFilter 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 NumberInFilter. + */ + public static NumberInFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberInFilter deserializedNumberInFilter = new NumberInFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberInFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberInFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getDouble()); + deserializedNumberInFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedNumberInFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeAdvancedFilter.java index 85d81e81087dd..e13be09b196cc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * NumberInRange Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberInRangeAdvancedFilter.class, - visible = true) -@JsonTypeName("NumberInRange") @Fluent public final class NumberInRangeAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.NUMBER_IN_RANGE; /* * The set of filter values. */ - @JsonProperty(value = "values") private List> values; /** @@ -88,6 +79,51 @@ public NumberInRangeAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, + (writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeDouble(element1))); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberInRangeAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberInRangeAdvancedFilter 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 NumberInRangeAdvancedFilter. + */ + public static NumberInRangeAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberInRangeAdvancedFilter deserializedNumberInRangeAdvancedFilter = new NumberInRangeAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberInRangeAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberInRangeAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List> values + = reader.readArray(reader1 -> reader1.readArray(reader2 -> reader2.getDouble())); + deserializedNumberInRangeAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedNumberInRangeAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeFilter.java index df2c0ff8c0970..497ac0cb384e5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * NumberInRange Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberInRangeFilter.class, - visible = true) -@JsonTypeName("NumberInRange") @Fluent public final class NumberInRangeFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.NUMBER_IN_RANGE; /* * The set of filter values. */ - @JsonProperty(value = "values") private List> values; /** @@ -88,6 +79,50 @@ public NumberInRangeFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, + (writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeDouble(element1))); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberInRangeFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberInRangeFilter 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 NumberInRangeFilter. + */ + public static NumberInRangeFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberInRangeFilter deserializedNumberInRangeFilter = new NumberInRangeFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberInRangeFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberInRangeFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List> values + = reader.readArray(reader1 -> reader1.readArray(reader2 -> reader2.getDouble())); + deserializedNumberInRangeFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedNumberInRangeFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanAdvancedFilter.java index 57aeec45757b3..a2fc2330df539 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanAdvancedFilter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * NumberLessThan Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberLessThanAdvancedFilter.class, - visible = true) -@JsonTypeName("NumberLessThan") @Fluent public final class NumberLessThanAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.NUMBER_LESS_THAN; /* * The filter value. */ - @JsonProperty(value = "value") private Double value; /** @@ -87,6 +78,48 @@ public NumberLessThanAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeNumberField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberLessThanAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberLessThanAdvancedFilter 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 NumberLessThanAdvancedFilter. + */ + public static NumberLessThanAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberLessThanAdvancedFilter deserializedNumberLessThanAdvancedFilter = new NumberLessThanAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberLessThanAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberLessThanAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedNumberLessThanAdvancedFilter.value = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedNumberLessThanAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanFilter.java index 37d9811433b9d..e32127ba1da28 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanFilter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * NumberLessThan Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberLessThanFilter.class, - visible = true) -@JsonTypeName("NumberLessThan") @Fluent public final class NumberLessThanFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.NUMBER_LESS_THAN; /* * The filter value. */ - @JsonProperty(value = "value") private Double value; /** @@ -87,6 +78,47 @@ public NumberLessThanFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeNumberField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberLessThanFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberLessThanFilter 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 NumberLessThanFilter. + */ + public static NumberLessThanFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberLessThanFilter deserializedNumberLessThanFilter = new NumberLessThanFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberLessThanFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberLessThanFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedNumberLessThanFilter.value = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedNumberLessThanFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsAdvancedFilter.java index e67829087e659..100469d8ac10b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsAdvancedFilter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * NumberLessThanOrEquals Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberLessThanOrEqualsAdvancedFilter.class, - visible = true) -@JsonTypeName("NumberLessThanOrEquals") @Fluent public final class NumberLessThanOrEqualsAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.NUMBER_LESS_THAN_OR_EQUALS; /* * The filter value. */ - @JsonProperty(value = "value") private Double value; /** @@ -87,6 +78,49 @@ public NumberLessThanOrEqualsAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeNumberField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberLessThanOrEqualsAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberLessThanOrEqualsAdvancedFilter 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 NumberLessThanOrEqualsAdvancedFilter. + */ + public static NumberLessThanOrEqualsAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberLessThanOrEqualsAdvancedFilter deserializedNumberLessThanOrEqualsAdvancedFilter + = new NumberLessThanOrEqualsAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberLessThanOrEqualsAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberLessThanOrEqualsAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedNumberLessThanOrEqualsAdvancedFilter.value = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedNumberLessThanOrEqualsAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsFilter.java index 7c10611fdd64b..436dda9417d24 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsFilter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * NumberLessThanOrEquals Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberLessThanOrEqualsFilter.class, - visible = true) -@JsonTypeName("NumberLessThanOrEquals") @Fluent public final class NumberLessThanOrEqualsFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.NUMBER_LESS_THAN_OR_EQUALS; /* * The filter value. */ - @JsonProperty(value = "value") private Double value; /** @@ -87,6 +78,48 @@ public NumberLessThanOrEqualsFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeNumberField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberLessThanOrEqualsFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberLessThanOrEqualsFilter 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 NumberLessThanOrEqualsFilter. + */ + public static NumberLessThanOrEqualsFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberLessThanOrEqualsFilter deserializedNumberLessThanOrEqualsFilter = new NumberLessThanOrEqualsFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberLessThanOrEqualsFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberLessThanOrEqualsFilter.operatorType + = FilterOperatorType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedNumberLessThanOrEqualsFilter.value = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedNumberLessThanOrEqualsFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInAdvancedFilter.java index d83a9a3a4f5c3..7ba56ae7f4c24 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * NumberNotIn Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberNotInAdvancedFilter.class, - visible = true) -@JsonTypeName("NumberNotIn") @Fluent public final class NumberNotInAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.NUMBER_NOT_IN; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,49 @@ public NumberNotInAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeDouble(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberNotInAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberNotInAdvancedFilter 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 NumberNotInAdvancedFilter. + */ + public static NumberNotInAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberNotInAdvancedFilter deserializedNumberNotInAdvancedFilter = new NumberNotInAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberNotInAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberNotInAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getDouble()); + deserializedNumberNotInAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedNumberNotInAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInFilter.java index 077a83c828405..9ab600f9a3f2f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * NumberNotIn Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberNotInFilter.class, - visible = true) -@JsonTypeName("NumberNotIn") @Fluent public final class NumberNotInFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.NUMBER_NOT_IN; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,48 @@ public NumberNotInFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeDouble(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberNotInFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberNotInFilter 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 NumberNotInFilter. + */ + public static NumberNotInFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberNotInFilter deserializedNumberNotInFilter = new NumberNotInFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberNotInFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberNotInFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getDouble()); + deserializedNumberNotInFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedNumberNotInFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeAdvancedFilter.java index e57d6b23ae197..dce50c3765301 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * NumberNotInRange Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberNotInRangeAdvancedFilter.class, - visible = true) -@JsonTypeName("NumberNotInRange") @Fluent public final class NumberNotInRangeAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.NUMBER_NOT_IN_RANGE; /* * The set of filter values. */ - @JsonProperty(value = "values") private List> values; /** @@ -88,6 +79,52 @@ public NumberNotInRangeAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, + (writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeDouble(element1))); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberNotInRangeAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberNotInRangeAdvancedFilter 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 NumberNotInRangeAdvancedFilter. + */ + public static NumberNotInRangeAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberNotInRangeAdvancedFilter deserializedNumberNotInRangeAdvancedFilter + = new NumberNotInRangeAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberNotInRangeAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberNotInRangeAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List> values + = reader.readArray(reader1 -> reader1.readArray(reader2 -> reader2.getDouble())); + deserializedNumberNotInRangeAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedNumberNotInRangeAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeFilter.java index c78cf2130d796..e6d2bbf02a4e2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * NumberNotInRange Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = NumberNotInRangeFilter.class, - visible = true) -@JsonTypeName("NumberNotInRange") @Fluent public final class NumberNotInRangeFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.NUMBER_NOT_IN_RANGE; /* * The set of filter values. */ - @JsonProperty(value = "values") private List> values; /** @@ -88,6 +79,50 @@ public NumberNotInRangeFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, + (writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeDouble(element1))); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NumberNotInRangeFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NumberNotInRangeFilter 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 NumberNotInRangeFilter. + */ + public static NumberNotInRangeFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NumberNotInRangeFilter deserializedNumberNotInRangeFilter = new NumberNotInRangeFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedNumberNotInRangeFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedNumberNotInRangeFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List> values + = reader.readArray(reader1 -> reader1.readArray(reader2 -> reader2.getDouble())); + deserializedNumberNotInRangeFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedNumberNotInRangeFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationInfo.java index b60831ecf4c3e..34b7a3669833f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationInfo.java @@ -5,35 +5,35 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 an operation. */ @Fluent -public final class OperationInfo { +public final class OperationInfo implements JsonSerializable { /* * Name of the provider */ - @JsonProperty(value = "provider") private String provider; /* * Name of the resource type */ - @JsonProperty(value = "resource") private String resource; /* * Name of the operation */ - @JsonProperty(value = "operation") private String operation; /* * Description of the operation */ - @JsonProperty(value = "description") private String description; /** @@ -129,4 +129,49 @@ public OperationInfo withDescription(String description) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", this.provider); + jsonWriter.writeStringField("resource", this.resource); + jsonWriter.writeStringField("operation", this.operation); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationInfo 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 OperationInfo. + */ + public static OperationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationInfo deserializedOperationInfo = new OperationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedOperationInfo.provider = reader.getString(); + } else if ("resource".equals(fieldName)) { + deserializedOperationInfo.resource = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedOperationInfo.operation = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationInfo.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationInfo; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationsListResult.java index 415f2757f45d6..680df0f439093 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationsListResult.java @@ -5,19 +5,22 @@ 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.OperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Operations operation. */ @Fluent -public final class OperationsListResult { +public final class OperationsListResult implements JsonSerializable { /* * A collection of operations */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,41 @@ public void validate() { 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)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationsListResult 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 OperationsListResult. + */ + public static OperationsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationsListResult deserializedOperationsListResult = new OperationsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); + deserializedOperationsListResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedOperationsListResult; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Partner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Partner.java index 5ba9bea15e1a4..7bce66052b806 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Partner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Partner.java @@ -5,33 +5,40 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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; +import java.util.Objects; import java.util.UUID; /** * Information about the partner. */ @Fluent -public final class Partner { +public final class Partner implements JsonSerializable { /* * The immutableId of the corresponding partner registration. */ - @JsonProperty(value = "partnerRegistrationImmutableId") private UUID partnerRegistrationImmutableId; /* * The partner name. */ - @JsonProperty(value = "partnerName") private String partnerName; /* - * Expiration time of the partner authorization. If this timer expires, any request from this partner to create, update or delete resources in subscriber's - * context will fail. If specified, the allowed values are between 1 to the value of defaultMaximumExpirationTimeInDays specified in PartnerConfiguration. - * If not specified, the default value will be the value of defaultMaximumExpirationTimeInDays specified in PartnerConfiguration or 7 if this value is not specified. + * Expiration time of the partner authorization. If this timer expires, any request from this partner to create, + * update or delete resources in subscriber's + * context will fail. If specified, the allowed values are between 1 to the value of + * defaultMaximumExpirationTimeInDays specified in PartnerConfiguration. + * If not specified, the default value will be the value of defaultMaximumExpirationTimeInDays specified in + * PartnerConfiguration or 7 if this value is not specified. */ - @JsonProperty(value = "authorizationExpirationTimeInUtc") private OffsetDateTime authorizationExpirationTimeInUtc; /** @@ -117,4 +124,52 @@ public Partner withAuthorizationExpirationTimeInUtc(OffsetDateTime authorization */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("partnerRegistrationImmutableId", + Objects.toString(this.partnerRegistrationImmutableId, null)); + jsonWriter.writeStringField("partnerName", this.partnerName); + jsonWriter.writeStringField("authorizationExpirationTimeInUtc", + this.authorizationExpirationTimeInUtc == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.authorizationExpirationTimeInUtc)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Partner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Partner 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 Partner. + */ + public static Partner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Partner deserializedPartner = new Partner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("partnerRegistrationImmutableId".equals(fieldName)) { + deserializedPartner.partnerRegistrationImmutableId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("partnerName".equals(fieldName)) { + deserializedPartner.partnerName = reader.getString(); + } else if ("authorizationExpirationTimeInUtc".equals(fieldName)) { + deserializedPartner.authorizationExpirationTimeInUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedPartner; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerAuthorization.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerAuthorization.java index 26dc39bb1ad14..a223183d9070c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerAuthorization.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerAuthorization.java @@ -5,25 +5,28 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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; /** * The partner authorization details. */ @Fluent -public final class PartnerAuthorization { +public final class PartnerAuthorization implements JsonSerializable { /* - * Time used to validate the authorization expiration time for each authorized partner. If DefaultMaximumExpirationTimeInDays is + * Time used to validate the authorization expiration time for each authorized partner. If + * DefaultMaximumExpirationTimeInDays is * not specified, the default is 7 days. Otherwise, allowed values are between 1 and 365 days. */ - @JsonProperty(value = "defaultMaximumExpirationTimeInDays") private Integer defaultMaximumExpirationTimeInDays; /* * The list of authorized partners. */ - @JsonProperty(value = "authorizedPartnersList") private List authorizedPartnersList; /** @@ -86,4 +89,46 @@ public void validate() { authorizedPartnersList().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("defaultMaximumExpirationTimeInDays", this.defaultMaximumExpirationTimeInDays); + jsonWriter.writeArrayField("authorizedPartnersList", this.authorizedPartnersList, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerAuthorization from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerAuthorization 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 PartnerAuthorization. + */ + public static PartnerAuthorization fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerAuthorization deserializedPartnerAuthorization = new PartnerAuthorization(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("defaultMaximumExpirationTimeInDays".equals(fieldName)) { + deserializedPartnerAuthorization.defaultMaximumExpirationTimeInDays + = reader.getNullable(JsonReader::getInt); + } else if ("authorizedPartnersList".equals(fieldName)) { + List authorizedPartnersList = reader.readArray(reader1 -> Partner.fromJson(reader1)); + deserializedPartnerAuthorization.authorizedPartnersList = authorizedPartnersList; + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerAuthorization; + }); + } } 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 index dab2a6dd7f5c7..97d9ba12c368a 100644 --- 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 @@ -5,36 +5,27 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +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. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "clientAuthenticationType", - defaultImpl = PartnerClientAuthentication.class, - visible = true) -@JsonTypeName("PartnerClientAuthentication") -@JsonSubTypes({ @JsonSubTypes.Type(name = "AzureAD", value = AzureADPartnerClientAuthentication.class) }) @Immutable -public class PartnerClientAuthentication { +public class PartnerClientAuthentication implements JsonSerializable { /* * Type of client authentication */ - @JsonTypeId - @JsonProperty(value = "clientAuthenticationType", required = true) - private PartnerClientAuthenticationType clientAuthenticationType; + private PartnerClientAuthenticationType clientAuthenticationType + = PartnerClientAuthenticationType.fromString("PartnerClientAuthentication"); /** * Creates an instance of PartnerClientAuthentication class. */ public PartnerClientAuthentication() { - this.clientAuthenticationType = PartnerClientAuthenticationType.fromString("PartnerClientAuthentication"); } /** @@ -53,4 +44,67 @@ public PartnerClientAuthenticationType clientAuthenticationType() { */ 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 index 66288fedf509b..9357adc266647 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public PartnerClientAuthenticationType() { * @param name a name to look for. * @return the corresponding PartnerClientAuthenticationType. */ - @JsonCreator public static PartnerClientAuthenticationType fromString(String name) { return fromString(name, 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 88349eacb688f..36f53196b996f 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/PartnerConfigurationProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationProvisioningState.java index c504c28ac1563..88af9e9b830b6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -58,7 +57,6 @@ public PartnerConfigurationProvisioningState() { * @param name a name to look for. * @return the corresponding PartnerConfigurationProvisioningState. */ - @JsonCreator public static PartnerConfigurationProvisioningState fromString(String name) { return fromString(name, PartnerConfigurationProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationUpdateParameters.java index 7c5bf5ed7728f..b9a78d3d3aef8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationUpdateParameters.java @@ -5,27 +5,28 @@ 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.PartnerConfigurationUpdateParameterProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** * Properties of the partner configuration update. */ @Fluent -public final class PartnerConfigurationUpdateParameters { +public final class PartnerConfigurationUpdateParameters + implements JsonSerializable { /* * Tags of the partner configuration resource. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Properties of the Topic resource. */ - @JsonProperty(value = "properties") private PartnerConfigurationUpdateParameterProperties innerProperties; /** @@ -99,4 +100,46 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerConfigurationUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerConfigurationUpdateParameters 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 PartnerConfigurationUpdateParameters. + */ + public static PartnerConfigurationUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerConfigurationUpdateParameters deserializedPartnerConfigurationUpdateParameters + = new PartnerConfigurationUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPartnerConfigurationUpdateParameters.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedPartnerConfigurationUpdateParameters.innerProperties + = PartnerConfigurationUpdateParameterProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerConfigurationUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationsListResult.java index d2b0419a67d04..a973d869d0a3d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationsListResult.java @@ -5,25 +5,27 @@ 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.PartnerConfigurationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List partner configurations operation. */ @Fluent -public final class PartnerConfigurationsListResult { +public final class PartnerConfigurationsListResult implements JsonSerializable { /* * A collection of partner configurations. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of partner configurations. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,46 @@ public void validate() { 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 PartnerConfigurationsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerConfigurationsListResult 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 PartnerConfigurationsListResult. + */ + public static PartnerConfigurationsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerConfigurationsListResult deserializedPartnerConfigurationsListResult + = new PartnerConfigurationsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PartnerConfigurationInner.fromJson(reader1)); + deserializedPartnerConfigurationsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPartnerConfigurationsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerConfigurationsListResult; + }); + } } 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 index 301406b1c620b..70bf8ad7fbc7e 100644 --- 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 @@ -53,7 +53,7 @@ public interface PartnerDestination { Map tags(); /** - * Gets the systemData property: The system metadata relating to Partner Destination 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/PartnerDestinationActivationState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationActivationState.java index baba72cb37dc6..fbf60be2096c8 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public PartnerDestinationActivationState() { * @param name a name to look for. * @return the corresponding PartnerDestinationActivationState. */ - @JsonCreator public static PartnerDestinationActivationState fromString(String name) { return fromString(name, 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 index 5600a7476cff4..f33b92d16f4c0 100644 --- 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 @@ -5,69 +5,54 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +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. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = PartnerDestinationInfo.class, - visible = true) -@JsonTypeName("PartnerDestinationInfo") -@JsonSubTypes({ @JsonSubTypes.Type(name = "WebHook", value = WebhookPartnerDestinationInfo.class) }) @Fluent -public class PartnerDestinationInfo { +public class PartnerDestinationInfo implements JsonSerializable { /* * Type of the endpoint for the partner destination */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) - private PartnerEndpointType endpointType; + 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. */ - @JsonProperty(value = "azureSubscriptionId") private String azureSubscriptionId; /* * Azure Resource Group of the subscriber. The partner destination associated with the channel will be * created under this resource group. */ - @JsonProperty(value = "resourceGroupName") private String resourceGroupName; /* * Name of the partner destination associated with the channel. */ - @JsonProperty(value = "name") private String name; /* * Additional context of the partner destination endpoint. */ - @JsonProperty(value = "endpointServiceContext") private String endpointServiceContext; /* * Change history of the resource move. */ - @JsonProperty(value = "resourceMoveChangeHistory") private List resourceMoveChangeHistory; /** * Creates an instance of PartnerDestinationInfo class. */ public PartnerDestinationInfo() { - this.endpointType = PartnerEndpointType.fromString("PartnerDestinationInfo"); } /** @@ -198,4 +183,84 @@ public void validate() { 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 index 0c808c40eddc9..fdcb370f4c334 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -64,7 +63,6 @@ public PartnerDestinationProvisioningState() { * @param name a name to look for. * @return the corresponding PartnerDestinationProvisioningState. */ - @JsonCreator public static PartnerDestinationProvisioningState fromString(String name) { return fromString(name, 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 index 5e6ec737958e2..2f941896d597a 100644 --- 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 @@ -5,20 +5,21 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import 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 { +public final class PartnerDestinationUpdateParameters implements JsonSerializable { /* * Tags of the Partner Destination resource. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** @@ -54,4 +55,42 @@ public PartnerDestinationUpdateParameters withTags(Map tags) { */ 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/PartnerDestinationsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationsListResult.java index 27109b15ef610..c67de8977496f 100644 --- 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 @@ -5,25 +5,27 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Partner Destinations operation. */ @Fluent -public final class PartnerDestinationsListResult { +public final class PartnerDestinationsListResult implements JsonSerializable { /* * A collection of partner destinations. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of partner destinations. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,46 @@ public void validate() { 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/PartnerDetails.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDetails.java index 94ae5ce3860e2..ef3b67ad290ac 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDetails.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDetails.java @@ -5,30 +5,32 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 partner. */ @Fluent -public final class PartnerDetails { +public final class PartnerDetails implements JsonSerializable { /* * This is short description about the partner. The length of this description should not exceed 256 characters. */ - @JsonProperty(value = "description") private String description; /* - * Long description for the partner's scenarios and integration.Length of this description should not exceed 2048 characters. + * Long description for the partner's scenarios and integration.Length of this description should not exceed 2048 + * characters. */ - @JsonProperty(value = "longDescription") private String longDescription; /* * URI of the partner website that can be used by Azure customers to setup Event Grid * integration on an event source. */ - @JsonProperty(value = "setupUri") private String setupUri; /** @@ -110,4 +112,46 @@ public PartnerDetails withSetupUri(String setupUri) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("longDescription", this.longDescription); + jsonWriter.writeStringField("setupUri", this.setupUri); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerDetails 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 PartnerDetails. + */ + public static PartnerDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerDetails deserializedPartnerDetails = new PartnerDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedPartnerDetails.description = reader.getString(); + } else if ("longDescription".equals(fieldName)) { + deserializedPartnerDetails.longDescription = reader.getString(); + } else if ("setupUri".equals(fieldName)) { + deserializedPartnerDetails.setupUri = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerDetails; + }); + } } 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 index 1c6f2e92e50bf..9897765401044 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public PartnerEndpointType() { * @param name a name to look for. * @return the corresponding PartnerEndpointType. */ - @JsonCreator public static PartnerEndpointType fromString(String name) { return fromString(name, 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 index 7795d04e052cc..4674321d8fefc 100644 --- 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 @@ -5,34 +5,25 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; /** * The PartnerEventSubscriptionDestination model. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = PartnerEventSubscriptionDestination.class, - visible = true) -@JsonTypeName("PartnerDestination") @Fluent public final class PartnerEventSubscriptionDestination extends EventSubscriptionDestination { /* * Type of the endpoint for the event subscription destination. */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private EndpointType endpointType = EndpointType.PARTNER_DESTINATION; /* * Partner Destination Properties of the event subscription destination. */ - @JsonProperty(value = "properties") private PartnerEventSubscriptionDestinationProperties innerProperties; /** @@ -92,9 +83,50 @@ public PartnerEventSubscriptionDestination withResourceId(String resourceId) { */ @Override public void validate() { - super.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 acc20aee58faf..7e804b08ab1ad 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/PartnerNamespaceProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceProvisioningState.java index 7bb85bcb17c18..cedf947081eeb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public PartnerNamespaceProvisioningState() { * @param name a name to look for. * @return the corresponding PartnerNamespaceProvisioningState. */ - @JsonCreator public static PartnerNamespaceProvisioningState fromString(String name) { return fromString(name, PartnerNamespaceProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceRegenerateKeyRequest.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceRegenerateKeyRequest.java index c7221efc3566e..db4b0d39c0723 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceRegenerateKeyRequest.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceRegenerateKeyRequest.java @@ -6,17 +6,21 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * PartnerNamespace regenerate shared access key request. */ @Fluent -public final class PartnerNamespaceRegenerateKeyRequest { +public final class PartnerNamespaceRegenerateKeyRequest + implements JsonSerializable { /* * Key name to regenerate (key1 or key2). */ - @JsonProperty(value = "keyName", required = true) private String keyName; /** @@ -59,4 +63,42 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PartnerNamespaceRegenerateKeyRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyName", this.keyName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerNamespaceRegenerateKeyRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerNamespaceRegenerateKeyRequest 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 PartnerNamespaceRegenerateKeyRequest. + */ + public static PartnerNamespaceRegenerateKeyRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerNamespaceRegenerateKeyRequest deserializedPartnerNamespaceRegenerateKeyRequest + = new PartnerNamespaceRegenerateKeyRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyName".equals(fieldName)) { + deserializedPartnerNamespaceRegenerateKeyRequest.keyName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerNamespaceRegenerateKeyRequest; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceUpdateParameters.java index 91ffa266f2b69..a77a9269f6e1e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceUpdateParameters.java @@ -5,9 +5,12 @@ 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.PartnerNamespaceUpdateParameterProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -15,18 +18,15 @@ * Properties of the Partner Namespace update. */ @Fluent -public final class PartnerNamespaceUpdateParameters { +public final class PartnerNamespaceUpdateParameters implements JsonSerializable { /* * Tags of the Partner Namespace. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Properties of the Partner Namespace. */ - @JsonProperty(value = "properties") private PartnerNamespaceUpdateParameterProperties innerProperties; /** @@ -182,4 +182,46 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerNamespaceUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerNamespaceUpdateParameters 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 PartnerNamespaceUpdateParameters. + */ + public static PartnerNamespaceUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerNamespaceUpdateParameters deserializedPartnerNamespaceUpdateParameters + = new PartnerNamespaceUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPartnerNamespaceUpdateParameters.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedPartnerNamespaceUpdateParameters.innerProperties + = PartnerNamespaceUpdateParameterProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerNamespaceUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespacesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespacesListResult.java index cbb87c59987df..6b681621e75a7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespacesListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespacesListResult.java @@ -5,25 +5,27 @@ 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.PartnerNamespaceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Partner Namespaces operation. */ @Fluent -public final class PartnerNamespacesListResult { +public final class PartnerNamespacesListResult implements JsonSerializable { /* * A collection of partner namespaces. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of partner namespaces. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,45 @@ public void validate() { 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 PartnerNamespacesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerNamespacesListResult 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 PartnerNamespacesListResult. + */ + public static PartnerNamespacesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerNamespacesListResult deserializedPartnerNamespacesListResult = new PartnerNamespacesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PartnerNamespaceInner.fromJson(reader1)); + deserializedPartnerNamespacesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPartnerNamespacesListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerNamespacesListResult; + }); + } } 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 c80eaa8dfeb72..ff89e48d53f64 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/PartnerRegistrationProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationProvisioningState.java index 6f1f1ef6e95d0..f5092fc10f932 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -58,7 +57,6 @@ public PartnerRegistrationProvisioningState() { * @param name a name to look for. * @return the corresponding PartnerRegistrationProvisioningState. */ - @JsonCreator public static PartnerRegistrationProvisioningState fromString(String name) { return fromString(name, PartnerRegistrationProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationUpdateParameters.java index 36eeae00f13ec..09e1008b0a2ed 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationUpdateParameters.java @@ -5,20 +5,22 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import 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 Registration update. */ @Fluent -public final class PartnerRegistrationUpdateParameters { +public final class PartnerRegistrationUpdateParameters + implements JsonSerializable { /* * Tags of the partner registration resource. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** @@ -54,4 +56,42 @@ public PartnerRegistrationUpdateParameters withTags(Map tags) { */ 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 PartnerRegistrationUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerRegistrationUpdateParameters 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 PartnerRegistrationUpdateParameters. + */ + public static PartnerRegistrationUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerRegistrationUpdateParameters deserializedPartnerRegistrationUpdateParameters + = new PartnerRegistrationUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPartnerRegistrationUpdateParameters.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerRegistrationUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationsListResult.java index aa7d74ebcd079..ba8322993c94a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationsListResult.java @@ -5,25 +5,27 @@ 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.PartnerRegistrationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Partner Registrations operation. */ @Fluent -public final class PartnerRegistrationsListResult { +public final class PartnerRegistrationsListResult implements JsonSerializable { /* * A collection of partner registrations. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of partner registrations. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,46 @@ public void validate() { 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 PartnerRegistrationsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerRegistrationsListResult 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 PartnerRegistrationsListResult. + */ + public static PartnerRegistrationsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerRegistrationsListResult deserializedPartnerRegistrationsListResult + = new PartnerRegistrationsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PartnerRegistrationInner.fromJson(reader1)); + deserializedPartnerRegistrationsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPartnerRegistrationsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerRegistrationsListResult; + }); + } } 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 2a5856f526480..2acafe873f699 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/PartnerTopicActivationState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicActivationState.java index 54109544294c5..103b1ad457295 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicActivationState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicActivationState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public PartnerTopicActivationState() { * @param name a name to look for. * @return the corresponding PartnerTopicActivationState. */ - @JsonCreator public static PartnerTopicActivationState fromString(String name) { return fromString(name, PartnerTopicActivationState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicInfo.java index ddd3d603bc02b..e4dc65552316d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicInfo.java @@ -5,38 +5,39 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 topic of a Channel. */ @Fluent -public final class PartnerTopicInfo { +public final class PartnerTopicInfo implements JsonSerializable { /* * Azure subscription ID of the subscriber. The partner topic associated with the channel will be * created under this Azure subscription. */ - @JsonProperty(value = "azureSubscriptionId") private String azureSubscriptionId; /* * Azure Resource Group of the subscriber. The partner topic associated with the channel will be * created under this resource group. */ - @JsonProperty(value = "resourceGroupName") private String resourceGroupName; /* * Name of the partner topic associated with the channel. */ - @JsonProperty(value = "name") private String name; /* - * Event Type Information for the partner topic. This information is provided by the publisher and can be used by the + * Event Type Information for the partner topic. This information is provided by the publisher and can be used by + * the * subscriber to view different types of events that are published. */ - @JsonProperty(value = "eventTypeInfo") private EventTypeInfo eventTypeInfo; /* @@ -44,7 +45,6 @@ public final class PartnerTopicInfo { * are originating. This information can be used by the subscriber during the approval process of the * created partner topic. */ - @JsonProperty(value = "source") private String source; /** @@ -181,4 +181,52 @@ public void validate() { eventTypeInfo().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("azureSubscriptionId", this.azureSubscriptionId); + jsonWriter.writeStringField("resourceGroupName", this.resourceGroupName); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("eventTypeInfo", this.eventTypeInfo); + jsonWriter.writeStringField("source", this.source); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerTopicInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerTopicInfo 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 PartnerTopicInfo. + */ + public static PartnerTopicInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerTopicInfo deserializedPartnerTopicInfo = new PartnerTopicInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureSubscriptionId".equals(fieldName)) { + deserializedPartnerTopicInfo.azureSubscriptionId = reader.getString(); + } else if ("resourceGroupName".equals(fieldName)) { + deserializedPartnerTopicInfo.resourceGroupName = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPartnerTopicInfo.name = reader.getString(); + } else if ("eventTypeInfo".equals(fieldName)) { + deserializedPartnerTopicInfo.eventTypeInfo = EventTypeInfo.fromJson(reader); + } else if ("source".equals(fieldName)) { + deserializedPartnerTopicInfo.source = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerTopicInfo; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicProvisioningState.java index b4d3eaabe4194..03395b9c77c80 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -63,7 +62,6 @@ public PartnerTopicProvisioningState() { * @param name a name to look for. * @return the corresponding PartnerTopicProvisioningState. */ - @JsonCreator public static PartnerTopicProvisioningState fromString(String name) { return fromString(name, PartnerTopicProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicRoutingMode.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicRoutingMode.java index 56db52b757b1d..f1e18ae405739 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicRoutingMode.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicRoutingMode.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -39,7 +38,6 @@ public PartnerTopicRoutingMode() { * @param name a name to look for. * @return the corresponding PartnerTopicRoutingMode. */ - @JsonCreator public static PartnerTopicRoutingMode fromString(String name) { return fromString(name, PartnerTopicRoutingMode.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicUpdateParameters.java index edeeac5fc91bb..49c9dbb7aac79 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicUpdateParameters.java @@ -5,26 +5,26 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import 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 Topic update. */ @Fluent -public final class PartnerTopicUpdateParameters { +public final class PartnerTopicUpdateParameters implements JsonSerializable { /* * Tags of the Partner Topic resource. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Identity information for the Partner Topic resource. */ - @JsonProperty(value = "identity") private IdentityInfo identity; /** @@ -83,4 +83,44 @@ public void validate() { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerTopicUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerTopicUpdateParameters 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 PartnerTopicUpdateParameters. + */ + public static PartnerTopicUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerTopicUpdateParameters deserializedPartnerTopicUpdateParameters = new PartnerTopicUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPartnerTopicUpdateParameters.tags = tags; + } else if ("identity".equals(fieldName)) { + deserializedPartnerTopicUpdateParameters.identity = IdentityInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerTopicUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicsListResult.java index 5f2af60abcf73..47afd62c9c1e8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicsListResult.java @@ -5,25 +5,27 @@ 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.PartnerTopicInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Partner Topics operation. */ @Fluent -public final class PartnerTopicsListResult { +public final class PartnerTopicsListResult implements JsonSerializable { /* * A collection of partner topics. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of partner topics. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 PartnerTopicsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerTopicsListResult 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 PartnerTopicsListResult. + */ + public static PartnerTopicsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerTopicsListResult deserializedPartnerTopicsListResult = new PartnerTopicsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> PartnerTopicInner.fromJson(reader1)); + deserializedPartnerTopicsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPartnerTopicsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerTopicsListResult; + }); + } } 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 index f1bb7f5a486be..1561fa4ae1475 100644 --- 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 @@ -5,36 +5,26 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +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. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = PartnerUpdateDestinationInfo.class, - visible = true) -@JsonTypeName("PartnerUpdateDestinationInfo") -@JsonSubTypes({ @JsonSubTypes.Type(name = "WebHook", value = WebhookUpdatePartnerDestinationInfo.class) }) @Immutable -public class PartnerUpdateDestinationInfo { +public class PartnerUpdateDestinationInfo implements JsonSerializable { /* * Type of the endpoint for the partner destination */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) - private PartnerEndpointType endpointType; + private PartnerEndpointType endpointType = PartnerEndpointType.fromString("PartnerUpdateDestinationInfo"); /** * Creates an instance of PartnerUpdateDestinationInfo class. */ public PartnerUpdateDestinationInfo() { - this.endpointType = PartnerEndpointType.fromString("PartnerUpdateDestinationInfo"); } /** @@ -53,4 +43,66 @@ public PartnerEndpointType endpointType() { */ 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/PartnerUpdateTopicInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateTopicInfo.java index d9c3c8d50c0d1..a58f77e70fd1e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateTopicInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateTopicInfo.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Update properties for the corresponding partner topic of a channel. */ @Fluent -public final class PartnerUpdateTopicInfo { +public final class PartnerUpdateTopicInfo implements JsonSerializable { /* * Event type info for the partner topic */ - @JsonProperty(value = "eventTypeInfo") private EventTypeInfo eventTypeInfo; /** @@ -54,4 +57,40 @@ public void validate() { eventTypeInfo().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("eventTypeInfo", this.eventTypeInfo); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerUpdateTopicInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerUpdateTopicInfo 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 PartnerUpdateTopicInfo. + */ + public static PartnerUpdateTopicInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerUpdateTopicInfo deserializedPartnerUpdateTopicInfo = new PartnerUpdateTopicInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("eventTypeInfo".equals(fieldName)) { + deserializedPartnerUpdateTopicInfo.eventTypeInfo = EventTypeInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerUpdateTopicInfo; + }); + } } 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 8293b6a3eb0dd..2e70b12a1b8b5 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/PermissionBindingProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingProvisioningState.java index c29d07fc0d9d5..1d4b3e93984da 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -62,7 +61,6 @@ public PermissionBindingProvisioningState() { * @param name a name to look for. * @return the corresponding PermissionBindingProvisioningState. */ - @JsonCreator public static PermissionBindingProvisioningState fromString(String name) { return fromString(name, PermissionBindingProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingsListResult.java index 6351e0196d710..d44cc02d030d1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingsListResult.java @@ -5,25 +5,27 @@ 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.PermissionBindingInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Permission Binding operation. */ @Fluent -public final class PermissionBindingsListResult { +public final class PermissionBindingsListResult implements JsonSerializable { /* * A collection of Permission Binding. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of Permission Binding. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,45 @@ public void validate() { 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 PermissionBindingsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PermissionBindingsListResult 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 PermissionBindingsListResult. + */ + public static PermissionBindingsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PermissionBindingsListResult deserializedPermissionBindingsListResult = new PermissionBindingsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PermissionBindingInner.fromJson(reader1)); + deserializedPermissionBindingsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPermissionBindingsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPermissionBindingsListResult; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionType.java index 80d28cfab961e..dd26e37ec6ab7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public PermissionType() { * @param name a name to look for. * @return the corresponding PermissionType. */ - @JsonCreator public static PermissionType fromString(String name) { return fromString(name, PermissionType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PersistedConnectionStatus.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PersistedConnectionStatus.java index 91983550dee2a..f42cc72d27b78 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PersistedConnectionStatus.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PersistedConnectionStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -47,7 +46,6 @@ public PersistedConnectionStatus() { * @param name a name to look for. * @return the corresponding PersistedConnectionStatus. */ - @JsonCreator public static PersistedConnectionStatus fromString(String name) { return fromString(name, PersistedConnectionStatus.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpoint.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpoint.java index a3e07d8ba399a..3caec036f3940 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpoint.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpoint.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * PrivateEndpoint information. */ @Fluent -public final class PrivateEndpoint { +public final class PrivateEndpoint implements JsonSerializable { /* * The ARM identifier for Private Endpoint. */ - @JsonProperty(value = "id") private String id; /** @@ -51,4 +54,40 @@ public PrivateEndpoint withId(String id) { */ 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 PrivateEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpoint 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 PrivateEndpoint. + */ + public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpoint.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpoint; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionListResult.java index 7f21d461682e0..1e039719e350b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionListResult.java @@ -5,25 +5,28 @@ 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.PrivateEndpointConnectionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the list of all private endpoint connections operation. */ @Fluent -public final class PrivateEndpointConnectionListResult { +public final class PrivateEndpointConnectionListResult + implements JsonSerializable { /* * A collection of private endpoint connection resources. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of private endpoint connection resources. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +85,46 @@ public void validate() { 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 PrivateEndpointConnectionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionListResult 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 PrivateEndpointConnectionListResult. + */ + public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult + = new PrivateEndpointConnectionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedPrivateEndpointConnectionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionListResult; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionsParentType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionsParentType.java index d8b6990338ebb..eed92653cb9ba 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionsParentType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionsParentType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -48,7 +47,6 @@ public PrivateEndpointConnectionsParentType() { * @param name a name to look for. * @return the corresponding PrivateEndpointConnectionsParentType. */ - @JsonCreator public static PrivateEndpointConnectionsParentType fromString(String name) { return fromString(name, PrivateEndpointConnectionsParentType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResourcesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResourcesListResult.java index a59da25f069fd..e424cae880a0c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResourcesListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResourcesListResult.java @@ -5,25 +5,27 @@ 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.PrivateLinkResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List private link resources operation. */ @Fluent -public final class PrivateLinkResourcesListResult { +public final class PrivateLinkResourcesListResult implements JsonSerializable { /* * A collection of private link resources */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of private link resources. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,46 @@ public void validate() { 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 PrivateLinkResourcesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourcesListResult 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 PrivateLinkResourcesListResult. + */ + public static PrivateLinkResourcesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourcesListResult deserializedPrivateLinkResourcesListResult + = new PrivateLinkResourcesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); + deserializedPrivateLinkResourcesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateLinkResourcesListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourcesListResult; + }); + } } 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 5a9f17b87cd63..0756cad18dc4c 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -44,7 +43,6 @@ public PublicNetworkAccess() { * @param name a name to look for. * @return the corresponding PublicNetworkAccess. */ - @JsonCreator public static PublicNetworkAccess fromString(String name) { return fromString(name, PublicNetworkAccess.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublisherType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublisherType.java index 30bdc3331cb33..306944b4c63c6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublisherType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublisherType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public PublisherType() { * @param name a name to look for. * @return the corresponding PublisherType. */ - @JsonCreator public static PublisherType fromString(String name) { return fromString(name, PublisherType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PushInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PushInfo.java index 15c0651757f9d..55b3370194f5b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PushInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PushInfo.java @@ -5,59 +5,63 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 destination info for event subscription supporting push. */ @Fluent -public final class PushInfo { +public final class PushInfo implements JsonSerializable { /* * The maximum delivery count of the events. */ - @JsonProperty(value = "maxDeliveryCount") private Integer maxDeliveryCount; /* - * Time span duration in ISO 8601 format that determines how long messages are available to the subscription from the time the message was published. + * Time span duration in ISO 8601 format that determines how long messages are available to the subscription from + * the time the message was published. * This duration value is expressed using the following format: \'P(n)Y(n)M(n)DT(n)H(n)M(n)S\', where: - * - (n) is replaced by the value of each time element that follows the (n). - * - P is the duration (or Period) designator and is always placed at the beginning of the duration. - * - Y is the year designator, and it follows the value for the number of years. - * - M is the month designator, and it follows the value for the number of months. - * - W is the week designator, and it follows the value for the number of weeks. - * - D is the day designator, and it follows the value for the number of days. - * - T is the time designator, and it precedes the time components. - * - H is the hour designator, and it follows the value for the number of hours. - * - M is the minute designator, and it follows the value for the number of minutes. - * - S is the second designator, and it follows the value for the number of seconds. - * This duration value cannot be set greater than the topic’s EventRetentionInDays. It is is an optional field where its minimum value is 1 minute, and its maximum is determined + * - (n) is replaced by the value of each time element that follows the (n). + * - P is the duration (or Period) designator and is always placed at the beginning of the duration. + * - Y is the year designator, and it follows the value for the number of years. + * - M is the month designator, and it follows the value for the number of months. + * - W is the week designator, and it follows the value for the number of weeks. + * - D is the day designator, and it follows the value for the number of days. + * - T is the time designator, and it precedes the time components. + * - H is the hour designator, and it follows the value for the number of hours. + * - M is the minute designator, and it follows the value for the number of minutes. + * - S is the second designator, and it follows the value for the number of seconds. + * This duration value cannot be set greater than the topic’s EventRetentionInDays. It is is an optional field where + * its minimum value is 1 minute, and its maximum is determined * by topic’s EventRetentionInDays value. The followings are examples of valid values: - * - \'P0DT23H12M\' or \'PT23H12M\': for duration of 23 hours and 12 minutes. - * - \'P1D\' or \'P1DT0H0M0S\': for duration of 1 day. + * - \'P0DT23H12M\' or \'PT23H12M\': for duration of 23 hours and 12 minutes. + * - \'P1D\' or \'P1DT0H0M0S\': for duration of 1 day. */ - @JsonProperty(value = "eventTimeToLive") private String eventTimeToLive; /* - * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. - * Uses the managed identity setup on the parent resource (namely, namespace) to acquire the authentication tokens being used during dead-lettering. + * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is + * sent to the dead letter destination. + * Uses the managed identity setup on the parent resource (namely, namespace) to acquire the authentication tokens + * being used during dead-lettering. */ - @JsonProperty(value = "deadLetterDestinationWithResourceIdentity") private DeadLetterWithResourceIdentity deadLetterDestinationWithResourceIdentity; /* * Information about the destination where events have to be delivered for the event subscription. - * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery. + * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication + * tokens being used during delivery. */ - @JsonProperty(value = "deliveryWithResourceIdentity") private DeliveryWithResourceIdentity deliveryWithResourceIdentity; /* * Information about the destination where events have to be delivered for the event subscription. * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery. */ - @JsonProperty(value = "destination") private EventSubscriptionDestination destination; /** @@ -233,4 +237,54 @@ public void validate() { destination().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maxDeliveryCount", this.maxDeliveryCount); + jsonWriter.writeStringField("eventTimeToLive", this.eventTimeToLive); + jsonWriter.writeJsonField("deadLetterDestinationWithResourceIdentity", + this.deadLetterDestinationWithResourceIdentity); + jsonWriter.writeJsonField("deliveryWithResourceIdentity", this.deliveryWithResourceIdentity); + jsonWriter.writeJsonField("destination", this.destination); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PushInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PushInfo 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 PushInfo. + */ + public static PushInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PushInfo deserializedPushInfo = new PushInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maxDeliveryCount".equals(fieldName)) { + deserializedPushInfo.maxDeliveryCount = reader.getNullable(JsonReader::getInt); + } else if ("eventTimeToLive".equals(fieldName)) { + deserializedPushInfo.eventTimeToLive = reader.getString(); + } else if ("deadLetterDestinationWithResourceIdentity".equals(fieldName)) { + deserializedPushInfo.deadLetterDestinationWithResourceIdentity + = DeadLetterWithResourceIdentity.fromJson(reader); + } else if ("deliveryWithResourceIdentity".equals(fieldName)) { + deserializedPushInfo.deliveryWithResourceIdentity = DeliveryWithResourceIdentity.fromJson(reader); + } else if ("destination".equals(fieldName)) { + deserializedPushInfo.destination = EventSubscriptionDestination.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPushInfo; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/QueueInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/QueueInfo.java index ca1c0feed2d6c..792dacda03042 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/QueueInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/QueueInfo.java @@ -5,54 +5,62 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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.Duration; /** * Properties of the Queue info for event subscription. */ @Fluent -public final class QueueInfo { +public final class QueueInfo implements JsonSerializable { /* - * Maximum period in seconds in which once the message is in received (by the client) state and waiting to be accepted, released or rejected. - * If this time elapsed after a message has been received by the client and not transitioned into accepted (not processed), released or rejected, - * the message is available for redelivery. This is an optional field, where default is 60 seconds, minimum is 60 seconds and maximum is 300 seconds. + * Maximum period in seconds in which once the message is in received (by the client) state and waiting to be + * accepted, released or rejected. + * If this time elapsed after a message has been received by the client and not transitioned into accepted (not + * processed), released or rejected, + * the message is available for redelivery. This is an optional field, where default is 60 seconds, minimum is 60 + * seconds and maximum is 300 seconds. */ - @JsonProperty(value = "receiveLockDurationInSeconds") private Integer receiveLockDurationInSeconds; /* * The maximum delivery count of the events. */ - @JsonProperty(value = "maxDeliveryCount") private Integer maxDeliveryCount; /* - * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. - * Uses the managed identity setup on the parent resource (namely, topic) to acquire the authentication tokens being used during delivery / dead-lettering. + * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is + * sent to the dead letter destination. + * Uses the managed identity setup on the parent resource (namely, topic) to acquire the authentication tokens being + * used during delivery / dead-lettering. */ - @JsonProperty(value = "deadLetterDestinationWithResourceIdentity") private DeadLetterWithResourceIdentity deadLetterDestinationWithResourceIdentity; /* - * Time span duration in ISO 8601 format that determines how long messages are available to the subscription from the time the message was published. + * Time span duration in ISO 8601 format that determines how long messages are available to the subscription from + * the time the message was published. * This duration value is expressed using the following format: \'P(n)Y(n)M(n)DT(n)H(n)M(n)S\', where: - * - (n) is replaced by the value of each time element that follows the (n). - * - P is the duration (or Period) designator and is always placed at the beginning of the duration. - * - Y is the year designator, and it follows the value for the number of years. - * - M is the month designator, and it follows the value for the number of months. - * - W is the week designator, and it follows the value for the number of weeks. - * - D is the day designator, and it follows the value for the number of days. - * - T is the time designator, and it precedes the time components. - * - H is the hour designator, and it follows the value for the number of hours. - * - M is the minute designator, and it follows the value for the number of minutes. - * - S is the second designator, and it follows the value for the number of seconds. - * This duration value cannot be set greater than the topic’s EventRetentionInDays. It is is an optional field where its minimum value is 1 minute, and its maximum is determined + * - (n) is replaced by the value of each time element that follows the (n). + * - P is the duration (or Period) designator and is always placed at the beginning of the duration. + * - Y is the year designator, and it follows the value for the number of years. + * - M is the month designator, and it follows the value for the number of months. + * - W is the week designator, and it follows the value for the number of weeks. + * - D is the day designator, and it follows the value for the number of days. + * - T is the time designator, and it precedes the time components. + * - H is the hour designator, and it follows the value for the number of hours. + * - M is the minute designator, and it follows the value for the number of minutes. + * - S is the second designator, and it follows the value for the number of seconds. + * This duration value cannot be set greater than the topic’s EventRetentionInDays. It is is an optional field where + * its minimum value is 1 minute, and its maximum is determined * by topic’s EventRetentionInDays value. The followings are examples of valid values: - * - \'P0DT23H12M\' or \'PT23H12M\': for duration of 23 hours and 12 minutes. - * - \'P1D\' or \'P1DT0H0M0S\': for duration of 1 day. + * - \'P0DT23H12M\' or \'PT23H12M\': for duration of 23 hours and 12 minutes. + * - \'P1D\' or \'P1DT0H0M0S\': for duration of 1 day. */ - @JsonProperty(value = "eventTimeToLive") private Duration eventTimeToLive; /** @@ -202,4 +210,52 @@ public void validate() { deadLetterDestinationWithResourceIdentity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("receiveLockDurationInSeconds", this.receiveLockDurationInSeconds); + jsonWriter.writeNumberField("maxDeliveryCount", this.maxDeliveryCount); + jsonWriter.writeJsonField("deadLetterDestinationWithResourceIdentity", + this.deadLetterDestinationWithResourceIdentity); + jsonWriter.writeStringField("eventTimeToLive", CoreUtils.durationToStringWithDays(this.eventTimeToLive)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QueueInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QueueInfo 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 QueueInfo. + */ + public static QueueInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QueueInfo deserializedQueueInfo = new QueueInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("receiveLockDurationInSeconds".equals(fieldName)) { + deserializedQueueInfo.receiveLockDurationInSeconds = reader.getNullable(JsonReader::getInt); + } else if ("maxDeliveryCount".equals(fieldName)) { + deserializedQueueInfo.maxDeliveryCount = reader.getNullable(JsonReader::getInt); + } else if ("deadLetterDestinationWithResourceIdentity".equals(fieldName)) { + deserializedQueueInfo.deadLetterDestinationWithResourceIdentity + = DeadLetterWithResourceIdentity.fromJson(reader); + } else if ("eventTimeToLive".equals(fieldName)) { + deserializedQueueInfo.eventTimeToLive + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedQueueInfo; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ReadinessState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ReadinessState.java index bb85e38ccc508..eac08334912a4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ReadinessState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ReadinessState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public ReadinessState() { * @param name a name to look for. * @return the corresponding ReadinessState. */ - @JsonCreator public static ReadinessState fromString(String name) { return fromString(name, ReadinessState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceAssociation.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceAssociation.java index 93f9405ae029c..2c79d74ddb92b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceAssociation.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceAssociation.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Nsp resource association. */ @Fluent -public final class ResourceAssociation { +public final class ResourceAssociation implements JsonSerializable { /* * Association name */ - @JsonProperty(value = "name") private String name; /* * Network security perimeter access mode. */ - @JsonProperty(value = "accessMode") private NetworkSecurityPerimeterAssociationAccessMode accessMode; /** @@ -77,4 +79,44 @@ public ResourceAssociation withAccessMode(NetworkSecurityPerimeterAssociationAcc */ 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 index d26348eeab501..e1269079a4802 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public ResourceKind() { * @param name a name to look for. * @return the corresponding ResourceKind. */ - @JsonCreator public static ResourceKind fromString(String name) { return fromString(name, 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 index 0a516c5d1ed10..2f8c53a3438d3 100644 --- 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 @@ -5,30 +5,33 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class ResourceMoveChangeHistory implements JsonSerializable { /* * Azure subscription ID of the resource. */ - @JsonProperty(value = "azureSubscriptionId") private String azureSubscriptionId; /* * Azure Resource Group of the resource. */ - @JsonProperty(value = "resourceGroupName") private String resourceGroupName; /* * UTC timestamp of when the resource was changed. */ - @JsonProperty(value = "changedTimeUtc") private OffsetDateTime changedTimeUtc; /** @@ -104,4 +107,48 @@ public ResourceMoveChangeHistory withChangedTimeUtc(OffsetDateTime changedTimeUt */ 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/ResourceProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceProvisioningState.java index 05492bd4f39c9..d167368ee78ac 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public ResourceProvisioningState() { * @param name a name to look for. * @return the corresponding ResourceProvisioningState. */ - @JsonCreator public static ResourceProvisioningState fromString(String name) { return fromString(name, ResourceProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceRegionType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceRegionType.java index 1bc9a675dfc53..a57c01c8cac64 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceRegionType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceRegionType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public ResourceRegionType() { * @param name a name to look for. * @return the corresponding ResourceRegionType. */ - @JsonCreator public static ResourceRegionType fromString(String name) { return fromString(name, ResourceRegionType.class); } 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 index 5b21dac78b629..f462aefc5dee2 100644 --- 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 @@ -5,17 +5,20 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 { +public final class ResourceSku implements JsonSerializable { /* * The Sku name of the resource. The possible values are: Basic or Premium. */ - @JsonProperty(value = "name") private Sku name; /** @@ -51,4 +54,40 @@ public ResourceSku withName(Sku name) { */ 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/RetryPolicy.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RetryPolicy.java index aea9a8b126b31..437e5642f1df7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RetryPolicy.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RetryPolicy.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 retry policy for an event subscription. */ @Fluent -public final class RetryPolicy { +public final class RetryPolicy implements JsonSerializable { /* * Maximum number of delivery retry attempts for events. */ - @JsonProperty(value = "maxDeliveryAttempts") private Integer maxDeliveryAttempts; /* * Time To Live (in minutes) for events. */ - @JsonProperty(value = "eventTimeToLiveInMinutes") private Integer eventTimeToLiveInMinutes; /** @@ -77,4 +79,43 @@ public RetryPolicy withEventTimeToLiveInMinutes(Integer eventTimeToLiveInMinutes */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maxDeliveryAttempts", this.maxDeliveryAttempts); + jsonWriter.writeNumberField("eventTimeToLiveInMinutes", this.eventTimeToLiveInMinutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RetryPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RetryPolicy 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 RetryPolicy. + */ + public static RetryPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RetryPolicy deserializedRetryPolicy = new RetryPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maxDeliveryAttempts".equals(fieldName)) { + deserializedRetryPolicy.maxDeliveryAttempts = reader.getNullable(JsonReader::getInt); + } else if ("eventTimeToLiveInMinutes".equals(fieldName)) { + deserializedRetryPolicy.eventTimeToLiveInMinutes = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedRetryPolicy; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingEnrichments.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingEnrichments.java index bda4c21552b54..7bc79753067a7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingEnrichments.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingEnrichments.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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; /** * The RoutingEnrichments model. */ @Fluent -public final class RoutingEnrichments { +public final class RoutingEnrichments implements JsonSerializable { /* * The static property. */ - @JsonProperty(value = "static") private List staticProperty; /* * The dynamic property. */ - @JsonProperty(value = "dynamic") private List dynamic; /** @@ -84,4 +86,47 @@ public void validate() { dynamic().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("static", this.staticProperty, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("dynamic", this.dynamic, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutingEnrichments from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutingEnrichments 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 RoutingEnrichments. + */ + public static RoutingEnrichments fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutingEnrichments deserializedRoutingEnrichments = new RoutingEnrichments(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("static".equals(fieldName)) { + List staticProperty + = reader.readArray(reader1 -> StaticRoutingEnrichment.fromJson(reader1)); + deserializedRoutingEnrichments.staticProperty = staticProperty; + } else if ("dynamic".equals(fieldName)) { + List dynamic + = reader.readArray(reader1 -> DynamicRoutingEnrichment.fromJson(reader1)); + deserializedRoutingEnrichments.dynamic = dynamic; + } else { + reader.skipChildren(); + } + } + + return deserializedRoutingEnrichments; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityInfo.java index c70e39b510afe..4ca8a0e5f8ab4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityInfo.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Routing identity info for topic spaces configuration. */ @Fluent -public final class RoutingIdentityInfo { +public final class RoutingIdentityInfo implements JsonSerializable { /* * Routing identity type for topic spaces configuration. */ - @JsonProperty(value = "type") private RoutingIdentityType type; /* * The userAssignedIdentity property. */ - @JsonProperty(value = "userAssignedIdentity") private String userAssignedIdentity; /** @@ -77,4 +79,43 @@ public RoutingIdentityInfo withUserAssignedIdentity(String userAssignedIdentity) */ public void validate() { } + + /** + * {@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 RoutingIdentityInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutingIdentityInfo 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 RoutingIdentityInfo. + */ + public static RoutingIdentityInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutingIdentityInfo deserializedRoutingIdentityInfo = new RoutingIdentityInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedRoutingIdentityInfo.type = RoutingIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedRoutingIdentityInfo.userAssignedIdentity = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRoutingIdentityInfo; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityType.java index e9b66ef84d65d..9d7051b0d2775 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public RoutingIdentityType() { * @param name a name to look for. * @return the corresponding RoutingIdentityType. */ - @JsonCreator public static RoutingIdentityType fromString(String name) { return fromString(name, RoutingIdentityType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusQueueEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusQueueEventSubscriptionDestination.java index 01dbf3ec4bc74..299dd409fa63e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusQueueEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusQueueEventSubscriptionDestination.java @@ -5,35 +5,26 @@ 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.ServiceBusQueueEventSubscriptionDestinationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; import java.util.List; /** * Information about the service bus destination for an event subscription. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = ServiceBusQueueEventSubscriptionDestination.class, - visible = true) -@JsonTypeName("ServiceBusQueue") @Fluent public final class ServiceBusQueueEventSubscriptionDestination extends EventSubscriptionDestination { /* * Type of the endpoint for the event subscription destination. */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private EndpointType endpointType = EndpointType.SERVICE_BUS_QUEUE; /* * Service Bus Properties of the event subscription destination. */ - @JsonProperty(value = "properties") private ServiceBusQueueEventSubscriptionDestinationProperties innerProperties; /** @@ -117,9 +108,50 @@ public List deliveryAttributeMappings() { */ @Override public void validate() { - super.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 ServiceBusQueueEventSubscriptionDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceBusQueueEventSubscriptionDestination 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 ServiceBusQueueEventSubscriptionDestination. + */ + public static ServiceBusQueueEventSubscriptionDestination fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceBusQueueEventSubscriptionDestination deserializedServiceBusQueueEventSubscriptionDestination + = new ServiceBusQueueEventSubscriptionDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedServiceBusQueueEventSubscriptionDestination.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedServiceBusQueueEventSubscriptionDestination.innerProperties + = ServiceBusQueueEventSubscriptionDestinationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceBusQueueEventSubscriptionDestination; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusTopicEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusTopicEventSubscriptionDestination.java index d9949d8ea4782..9829af57fe8ca 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusTopicEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusTopicEventSubscriptionDestination.java @@ -5,35 +5,26 @@ 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.ServiceBusTopicEventSubscriptionDestinationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; import java.util.List; /** * Information about the service bus topic destination for an event subscription. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = ServiceBusTopicEventSubscriptionDestination.class, - visible = true) -@JsonTypeName("ServiceBusTopic") @Fluent public final class ServiceBusTopicEventSubscriptionDestination extends EventSubscriptionDestination { /* * Type of the endpoint for the event subscription destination. */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private EndpointType endpointType = EndpointType.SERVICE_BUS_TOPIC; /* * Service Bus Topic Properties of the event subscription destination. */ - @JsonProperty(value = "properties") private ServiceBusTopicEventSubscriptionDestinationProperties innerProperties; /** @@ -117,9 +108,50 @@ public List deliveryAttributeMappings() { */ @Override public void validate() { - super.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 ServiceBusTopicEventSubscriptionDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceBusTopicEventSubscriptionDestination 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 ServiceBusTopicEventSubscriptionDestination. + */ + public static ServiceBusTopicEventSubscriptionDestination fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceBusTopicEventSubscriptionDestination deserializedServiceBusTopicEventSubscriptionDestination + = new ServiceBusTopicEventSubscriptionDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedServiceBusTopicEventSubscriptionDestination.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedServiceBusTopicEventSubscriptionDestination.innerProperties + = ServiceBusTopicEventSubscriptionDestinationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceBusTopicEventSubscriptionDestination; + }); + } } 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 index f0d1fd24e2614..794aeca1c8eed 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public Sku() { * @param name a name to look for. * @return the corresponding Sku. */ - @JsonCreator public static Sku fromString(String name) { return fromString(name, Sku.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SkuName.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SkuName.java index d42e9a9cc9aee..24be19cb6db8d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SkuName.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SkuName.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public SkuName() { * @param name a name to look for. * @return the corresponding SkuName. */ - @JsonCreator public static SkuName fromString(String name) { return fromString(name, SkuName.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticDeliveryAttributeMapping.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticDeliveryAttributeMapping.java index 3a68ba0cb87c0..83fc36fcb2e41 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticDeliveryAttributeMapping.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticDeliveryAttributeMapping.java @@ -5,34 +5,25 @@ 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.StaticDeliveryAttributeMappingProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; /** * Static delivery attribute mapping details. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type", - defaultImpl = StaticDeliveryAttributeMapping.class, - visible = true) -@JsonTypeName("Static") @Fluent public final class StaticDeliveryAttributeMapping extends DeliveryAttributeMapping { /* * Type of the delivery attribute or header name. */ - @JsonTypeId - @JsonProperty(value = "type", required = true) private DeliveryAttributeMappingType type = DeliveryAttributeMappingType.STATIC; /* * Properties of static delivery attribute mapping. */ - @JsonProperty(value = "properties") private StaticDeliveryAttributeMappingProperties innerProperties; /** @@ -122,9 +113,53 @@ public StaticDeliveryAttributeMapping withIsSecret(Boolean isSecret) { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticDeliveryAttributeMapping from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticDeliveryAttributeMapping 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 StaticDeliveryAttributeMapping. + */ + public static StaticDeliveryAttributeMapping fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticDeliveryAttributeMapping deserializedStaticDeliveryAttributeMapping + = new StaticDeliveryAttributeMapping(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedStaticDeliveryAttributeMapping.withName(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedStaticDeliveryAttributeMapping.type + = DeliveryAttributeMappingType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedStaticDeliveryAttributeMapping.innerProperties + = StaticDeliveryAttributeMappingProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStaticDeliveryAttributeMapping; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichment.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichment.java index aef25229c2f00..45b486558bb1a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichment.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichment.java @@ -5,42 +5,31 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Static routing enrichment details. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "valueType", - defaultImpl = StaticRoutingEnrichment.class, - visible = true) -@JsonTypeName("StaticRoutingEnrichment") -@JsonSubTypes({ @JsonSubTypes.Type(name = "String", value = StaticStringRoutingEnrichment.class) }) @Fluent -public class StaticRoutingEnrichment { +public class StaticRoutingEnrichment implements JsonSerializable { /* * Static routing enrichment value type. For e.g. this property value can be 'String'. */ - @JsonTypeId - @JsonProperty(value = "valueType", required = true) - private StaticRoutingEnrichmentType valueType; + private StaticRoutingEnrichmentType valueType = StaticRoutingEnrichmentType.fromString("StaticRoutingEnrichment"); /* * Static routing enrichment key. */ - @JsonProperty(value = "key") private String key; /** * Creates an instance of StaticRoutingEnrichment class. */ public StaticRoutingEnrichment() { - this.valueType = StaticRoutingEnrichmentType.fromString("StaticRoutingEnrichment"); } /** @@ -79,4 +68,69 @@ public StaticRoutingEnrichment withKey(String key) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("valueType", this.valueType == null ? null : this.valueType.toString()); + jsonWriter.writeStringField("key", this.key); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticRoutingEnrichment from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticRoutingEnrichment 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 StaticRoutingEnrichment. + */ + public static StaticRoutingEnrichment 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 ("valueType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("String".equals(discriminatorValue)) { + return StaticStringRoutingEnrichment.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static StaticRoutingEnrichment fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticRoutingEnrichment deserializedStaticRoutingEnrichment = new StaticRoutingEnrichment(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("valueType".equals(fieldName)) { + deserializedStaticRoutingEnrichment.valueType + = StaticRoutingEnrichmentType.fromString(reader.getString()); + } else if ("key".equals(fieldName)) { + deserializedStaticRoutingEnrichment.key = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStaticRoutingEnrichment; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichmentType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichmentType.java index 3472001f08108..3c42a1ebef62b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichmentType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichmentType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public StaticRoutingEnrichmentType() { * @param name a name to look for. * @return the corresponding StaticRoutingEnrichmentType. */ - @JsonCreator public static StaticRoutingEnrichmentType fromString(String name) { return fromString(name, StaticRoutingEnrichmentType.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticStringRoutingEnrichment.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticStringRoutingEnrichment.java index 323eed0dcd315..0dff06b61a970 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticStringRoutingEnrichment.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticStringRoutingEnrichment.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The StaticStringRoutingEnrichment model. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "valueType", - defaultImpl = StaticStringRoutingEnrichment.class, - visible = true) -@JsonTypeName("String") @Fluent public final class StaticStringRoutingEnrichment extends StaticRoutingEnrichment { /* * Static routing enrichment value type. For e.g. this property value can be 'String'. */ - @JsonTypeId - @JsonProperty(value = "valueType", required = true) private StaticRoutingEnrichmentType valueType = StaticRoutingEnrichmentType.STRING; /* * String type routing enrichment value. */ - @JsonProperty(value = "value") private String value; /** @@ -86,6 +77,49 @@ public StaticStringRoutingEnrichment withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("valueType", this.valueType == null ? null : this.valueType.toString()); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticStringRoutingEnrichment from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticStringRoutingEnrichment 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 StaticStringRoutingEnrichment. + */ + public static StaticStringRoutingEnrichment fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticStringRoutingEnrichment deserializedStaticStringRoutingEnrichment + = new StaticStringRoutingEnrichment(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStaticStringRoutingEnrichment.withKey(reader.getString()); + } else if ("valueType".equals(fieldName)) { + deserializedStaticStringRoutingEnrichment.valueType + = StaticRoutingEnrichmentType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedStaticStringRoutingEnrichment.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStaticStringRoutingEnrichment; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageBlobDeadLetterDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageBlobDeadLetterDestination.java index f131a96e81cf3..ee4fb2b0c799b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageBlobDeadLetterDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageBlobDeadLetterDestination.java @@ -5,34 +5,25 @@ 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.StorageBlobDeadLetterDestinationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; /** * Information about the storage blob based dead letter destination. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = StorageBlobDeadLetterDestination.class, - visible = true) -@JsonTypeName("StorageBlob") @Fluent public final class StorageBlobDeadLetterDestination extends DeadLetterDestination { /* * Type of the endpoint for the dead letter destination */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private DeadLetterEndPointType endpointType = DeadLetterEndPointType.STORAGE_BLOB; /* * The properties of the Storage Blob based deadletter destination */ - @JsonProperty(value = "properties") private StorageBlobDeadLetterDestinationProperties innerProperties; /** @@ -117,9 +108,50 @@ public StorageBlobDeadLetterDestination withBlobContainerName(String blobContain */ @Override public void validate() { - super.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 StorageBlobDeadLetterDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageBlobDeadLetterDestination 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 StorageBlobDeadLetterDestination. + */ + public static StorageBlobDeadLetterDestination fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageBlobDeadLetterDestination deserializedStorageBlobDeadLetterDestination + = new StorageBlobDeadLetterDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedStorageBlobDeadLetterDestination.endpointType + = DeadLetterEndPointType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedStorageBlobDeadLetterDestination.innerProperties + = StorageBlobDeadLetterDestinationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageBlobDeadLetterDestination; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageQueueEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageQueueEventSubscriptionDestination.java index a2a12a05a1920..84c7bcba393ad 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageQueueEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageQueueEventSubscriptionDestination.java @@ -5,34 +5,25 @@ 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.StorageQueueEventSubscriptionDestinationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; /** * Information about the storage queue destination for an event subscription. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = StorageQueueEventSubscriptionDestination.class, - visible = true) -@JsonTypeName("StorageQueue") @Fluent public final class StorageQueueEventSubscriptionDestination extends EventSubscriptionDestination { /* * Type of the endpoint for the event subscription destination. */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private EndpointType endpointType = EndpointType.STORAGE_QUEUE; /* * Storage Queue Properties of the event subscription destination. */ - @JsonProperty(value = "properties") private StorageQueueEventSubscriptionDestinationProperties innerProperties; /** @@ -145,9 +136,50 @@ public Long queueMessageTimeToLiveInSeconds() { */ @Override public void validate() { - super.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 StorageQueueEventSubscriptionDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageQueueEventSubscriptionDestination 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 StorageQueueEventSubscriptionDestination. + */ + public static StorageQueueEventSubscriptionDestination fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageQueueEventSubscriptionDestination deserializedStorageQueueEventSubscriptionDestination + = new StorageQueueEventSubscriptionDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedStorageQueueEventSubscriptionDestination.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedStorageQueueEventSubscriptionDestination.innerProperties + = StorageQueueEventSubscriptionDestinationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageQueueEventSubscriptionDestination; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithAdvancedFilter.java index 94a954d158931..45c66fbc63fec 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringBeginsWith Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringBeginsWithAdvancedFilter.class, - visible = true) -@JsonTypeName("StringBeginsWith") @Fluent public final class StringBeginsWithAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.STRING_BEGINS_WITH; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,50 @@ public StringBeginsWithAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringBeginsWithAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringBeginsWithAdvancedFilter 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 StringBeginsWithAdvancedFilter. + */ + public static StringBeginsWithAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringBeginsWithAdvancedFilter deserializedStringBeginsWithAdvancedFilter + = new StringBeginsWithAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringBeginsWithAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringBeginsWithAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringBeginsWithAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringBeginsWithAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithFilter.java index 894626a99ba0b..e746a1826c2cd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringBeginsWith Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringBeginsWithFilter.class, - visible = true) -@JsonTypeName("StringBeginsWith") @Fluent public final class StringBeginsWithFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.STRING_BEGINS_WITH; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,48 @@ public StringBeginsWithFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringBeginsWithFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringBeginsWithFilter 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 StringBeginsWithFilter. + */ + public static StringBeginsWithFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringBeginsWithFilter deserializedStringBeginsWithFilter = new StringBeginsWithFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringBeginsWithFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringBeginsWithFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringBeginsWithFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringBeginsWithFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsAdvancedFilter.java index 3854bb5f93af2..b70d6948a0ce0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringContains Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringContainsAdvancedFilter.class, - visible = true) -@JsonTypeName("StringContains") @Fluent public final class StringContainsAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.STRING_CONTAINS; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,49 @@ public StringContainsAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringContainsAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringContainsAdvancedFilter 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 StringContainsAdvancedFilter. + */ + public static StringContainsAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringContainsAdvancedFilter deserializedStringContainsAdvancedFilter = new StringContainsAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringContainsAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringContainsAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringContainsAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringContainsAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsFilter.java index d93c37ba873c6..eeacaaabb2bb7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringContains Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringContainsFilter.class, - visible = true) -@JsonTypeName("StringContains") @Fluent public final class StringContainsFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.STRING_CONTAINS; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,48 @@ public StringContainsFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringContainsFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringContainsFilter 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 StringContainsFilter. + */ + public static StringContainsFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringContainsFilter deserializedStringContainsFilter = new StringContainsFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringContainsFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringContainsFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringContainsFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringContainsFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithAdvancedFilter.java index 180ac7679ffaa..24e369e3b1185 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringEndsWith Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringEndsWithAdvancedFilter.class, - visible = true) -@JsonTypeName("StringEndsWith") @Fluent public final class StringEndsWithAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.STRING_ENDS_WITH; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,49 @@ public StringEndsWithAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringEndsWithAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringEndsWithAdvancedFilter 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 StringEndsWithAdvancedFilter. + */ + public static StringEndsWithAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringEndsWithAdvancedFilter deserializedStringEndsWithAdvancedFilter = new StringEndsWithAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringEndsWithAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringEndsWithAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringEndsWithAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringEndsWithAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithFilter.java index b2c35948212a4..b42a5c0f1ce2a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringEndsWith Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringEndsWithFilter.class, - visible = true) -@JsonTypeName("StringEndsWith") @Fluent public final class StringEndsWithFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.STRING_ENDS_WITH; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,48 @@ public StringEndsWithFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringEndsWithFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringEndsWithFilter 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 StringEndsWithFilter. + */ + public static StringEndsWithFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringEndsWithFilter deserializedStringEndsWithFilter = new StringEndsWithFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringEndsWithFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringEndsWithFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringEndsWithFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringEndsWithFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInAdvancedFilter.java index 6fdcb943cdc9b..fde5e5c0b42ab 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringIn Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringInAdvancedFilter.class, - visible = true) -@JsonTypeName("StringIn") @Fluent public final class StringInAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.STRING_IN; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,49 @@ public StringInAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringInAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringInAdvancedFilter 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 StringInAdvancedFilter. + */ + public static StringInAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringInAdvancedFilter deserializedStringInAdvancedFilter = new StringInAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringInAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringInAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringInAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringInAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInFilter.java index ed0ccc19a8fb4..79a4ba57eb54b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInFilter.java @@ -5,30 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringIn Filter. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "operatorType", defaultImpl = StringInFilter.class, visible = true) -@JsonTypeName("StringIn") @Fluent public final class StringInFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.STRING_IN; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -84,6 +79,48 @@ public StringInFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringInFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringInFilter 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 StringInFilter. + */ + public static StringInFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringInFilter deserializedStringInFilter = new StringInFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringInFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringInFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringInFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringInFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithAdvancedFilter.java index 54c5330e54076..87852c6d7bf60 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringNotBeginsWith Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringNotBeginsWithAdvancedFilter.class, - visible = true) -@JsonTypeName("StringNotBeginsWith") @Fluent public final class StringNotBeginsWithAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.STRING_NOT_BEGINS_WITH; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,50 @@ public StringNotBeginsWithAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringNotBeginsWithAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringNotBeginsWithAdvancedFilter 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 StringNotBeginsWithAdvancedFilter. + */ + public static StringNotBeginsWithAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringNotBeginsWithAdvancedFilter deserializedStringNotBeginsWithAdvancedFilter + = new StringNotBeginsWithAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringNotBeginsWithAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringNotBeginsWithAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringNotBeginsWithAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringNotBeginsWithAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithFilter.java index d81b78a14b968..f891b468744d3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringNotBeginsWith Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringNotBeginsWithFilter.class, - visible = true) -@JsonTypeName("StringNotBeginsWith") @Fluent public final class StringNotBeginsWithFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.STRING_NOT_BEGINS_WITH; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,49 @@ public StringNotBeginsWithFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringNotBeginsWithFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringNotBeginsWithFilter 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 StringNotBeginsWithFilter. + */ + public static StringNotBeginsWithFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringNotBeginsWithFilter deserializedStringNotBeginsWithFilter = new StringNotBeginsWithFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringNotBeginsWithFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringNotBeginsWithFilter.operatorType + = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringNotBeginsWithFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringNotBeginsWithFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsAdvancedFilter.java index 7c02b620248e2..3734d7208716c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringNotContains Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringNotContainsAdvancedFilter.class, - visible = true) -@JsonTypeName("StringNotContains") @Fluent public final class StringNotContainsAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.STRING_NOT_CONTAINS; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,50 @@ public StringNotContainsAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringNotContainsAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringNotContainsAdvancedFilter 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 StringNotContainsAdvancedFilter. + */ + public static StringNotContainsAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringNotContainsAdvancedFilter deserializedStringNotContainsAdvancedFilter + = new StringNotContainsAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringNotContainsAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringNotContainsAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringNotContainsAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringNotContainsAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsFilter.java index 65d228d1c5a12..fcc33951160f9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringNotContains Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringNotContainsFilter.class, - visible = true) -@JsonTypeName("StringNotContains") @Fluent public final class StringNotContainsFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.STRING_NOT_CONTAINS; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,49 @@ public StringNotContainsFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringNotContainsFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringNotContainsFilter 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 StringNotContainsFilter. + */ + public static StringNotContainsFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringNotContainsFilter deserializedStringNotContainsFilter = new StringNotContainsFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringNotContainsFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringNotContainsFilter.operatorType + = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringNotContainsFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringNotContainsFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithAdvancedFilter.java index 9d73e82d2af71..32d597433091e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringNotEndsWith Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringNotEndsWithAdvancedFilter.class, - visible = true) -@JsonTypeName("StringNotEndsWith") @Fluent public final class StringNotEndsWithAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.STRING_NOT_ENDS_WITH; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,50 @@ public StringNotEndsWithAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringNotEndsWithAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringNotEndsWithAdvancedFilter 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 StringNotEndsWithAdvancedFilter. + */ + public static StringNotEndsWithAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringNotEndsWithAdvancedFilter deserializedStringNotEndsWithAdvancedFilter + = new StringNotEndsWithAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringNotEndsWithAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringNotEndsWithAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringNotEndsWithAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringNotEndsWithAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithFilter.java index 08110cc2d6bd6..dccad82d21e02 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringNotEndsWith Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringNotEndsWithFilter.class, - visible = true) -@JsonTypeName("StringNotEndsWith") @Fluent public final class StringNotEndsWithFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.STRING_NOT_ENDS_WITH; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,49 @@ public StringNotEndsWithFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringNotEndsWithFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringNotEndsWithFilter 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 StringNotEndsWithFilter. + */ + public static StringNotEndsWithFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringNotEndsWithFilter deserializedStringNotEndsWithFilter = new StringNotEndsWithFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringNotEndsWithFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringNotEndsWithFilter.operatorType + = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringNotEndsWithFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringNotEndsWithFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInAdvancedFilter.java index 9fd7bd070d457..b6f76fc5b0fb0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInAdvancedFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringNotIn Advanced Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringNotInAdvancedFilter.class, - visible = true) -@JsonTypeName("StringNotIn") @Fluent public final class StringNotInAdvancedFilter extends AdvancedFilter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private AdvancedFilterOperatorType operatorType = AdvancedFilterOperatorType.STRING_NOT_IN; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,49 @@ public StringNotInAdvancedFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringNotInAdvancedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringNotInAdvancedFilter 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 StringNotInAdvancedFilter. + */ + public static StringNotInAdvancedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringNotInAdvancedFilter deserializedStringNotInAdvancedFilter = new StringNotInAdvancedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringNotInAdvancedFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringNotInAdvancedFilter.operatorType + = AdvancedFilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringNotInAdvancedFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringNotInAdvancedFilter; + }); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInFilter.java index 4dc602a33e69b..8d9501afd19ff 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInFilter.java @@ -5,34 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * StringNotIn Filter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "operatorType", - defaultImpl = StringNotInFilter.class, - visible = true) -@JsonTypeName("StringNotIn") @Fluent public final class StringNotInFilter extends Filter { /* * The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ - @JsonTypeId - @JsonProperty(value = "operatorType", required = true) private FilterOperatorType operatorType = FilterOperatorType.STRING_NOT_IN; /* * The set of filter values. */ - @JsonProperty(value = "values") private List values; /** @@ -88,6 +79,48 @@ public StringNotInFilter withKey(String key) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", key()); + jsonWriter.writeStringField("operatorType", this.operatorType == null ? null : this.operatorType.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringNotInFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringNotInFilter 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 StringNotInFilter. + */ + public static StringNotInFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringNotInFilter deserializedStringNotInFilter = new StringNotInFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringNotInFilter.withKey(reader.getString()); + } else if ("operatorType".equals(fieldName)) { + deserializedStringNotInFilter.operatorType = FilterOperatorType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedStringNotInFilter.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedStringNotInFilter; + }); } } 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 39900a2e69218..a20a759206ea7 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 @@ -9,6 +9,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner; import java.time.OffsetDateTime; +import java.util.Map; /** * An immutable client-side representation of Subscription. @@ -36,7 +37,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. */ @@ -77,6 +78,13 @@ public interface Subscription { */ OffsetDateTime expirationTimeUtc(); + /** + * Gets the tags property: Tags relating to Event Subscription resource. + * + * @return the tags value. + */ + Map tags(); + /** * Gets the name of the resource group. * @@ -127,9 +135,9 @@ interface WithParentResource { * The stage of the Subscription definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithDeliveryConfiguration, DefinitionStages.WithEventDeliverySchema, - DefinitionStages.WithFiltersConfiguration, DefinitionStages.WithExpirationTimeUtc { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithDeliveryConfiguration, + DefinitionStages.WithEventDeliverySchema, DefinitionStages.WithFiltersConfiguration, + DefinitionStages.WithExpirationTimeUtc { /** * Executes the create request. * @@ -146,6 +154,19 @@ interface WithCreate Subscription create(Context context); } + /** + * The stage of the Subscription definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Tags relating to Event Subscription resource.. + * + * @param tags Tags relating to Event Subscription resource. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** * The stage of the Subscription definition allowing to specify deliveryConfiguration. */ @@ -210,7 +231,8 @@ interface WithExpirationTimeUtc { /** * The template for Subscription update. */ - interface Update extends UpdateStages.WithDeliveryConfiguration, UpdateStages.WithEventDeliverySchema, + interface Update + extends UpdateStages.WithTags, UpdateStages.WithDeliveryConfiguration, UpdateStages.WithEventDeliverySchema, UpdateStages.WithFiltersConfiguration, UpdateStages.WithExpirationTimeUtc { /** * Executes the update request. @@ -232,6 +254,19 @@ interface Update extends UpdateStages.WithDeliveryConfiguration, UpdateStages.Wi * The Subscription update stages. */ interface UpdateStages { + /** + * The stage of the Subscription update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Tags relating to Event Subscription resource.. + * + * @param tags Tags relating to Event Subscription resource. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** * The stage of the Subscription update allowing to specify deliveryConfiguration. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionProvisioningState.java index 5c65a5dfaba62..94a24d51fd706 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -82,7 +81,6 @@ public SubscriptionProvisioningState() { * @param name a name to look for. * @return the corresponding SubscriptionProvisioningState. */ - @JsonCreator public static SubscriptionProvisioningState fromString(String name) { return fromString(name, SubscriptionProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionUpdateParameters.java index 464bf3e628d70..f6c87dc649832 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionUpdateParameters.java @@ -5,19 +5,23 @@ 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.SubscriptionUpdateParametersProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Map; /** * Properties of the Event Subscription update. */ @Fluent -public final class SubscriptionUpdateParameters { +public final class SubscriptionUpdateParameters implements JsonSerializable { /* * Properties of the Event Subscription update parameters. */ - @JsonProperty(value = "properties") private SubscriptionUpdateParametersProperties innerProperties; /** @@ -127,6 +131,29 @@ public SubscriptionUpdateParameters withExpirationTimeUtc(OffsetDateTime expirat return this; } + /** + * Get the tags property: Tags relating to Event Subscription resource. + * + * @return the tags value. + */ + public Map tags() { + return this.innerProperties() == null ? null : this.innerProperties().tags(); + } + + /** + * Set the tags property: Tags relating to Event Subscription resource. + * + * @param tags the tags value to set. + * @return the SubscriptionUpdateParameters object itself. + */ + public SubscriptionUpdateParameters withTags(Map tags) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionUpdateParametersProperties(); + } + this.innerProperties().withTags(tags); + return this; + } + /** * Validates the instance. * @@ -137,4 +164,41 @@ public void validate() { 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 SubscriptionUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionUpdateParameters 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 SubscriptionUpdateParameters. + */ + public static SubscriptionUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionUpdateParameters deserializedSubscriptionUpdateParameters = new SubscriptionUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedSubscriptionUpdateParameters.innerProperties + = SubscriptionUpdateParametersProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionsListResult.java index d6cafcddd5f32..dfd21aef654a3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionsListResult.java @@ -5,25 +5,27 @@ 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.SubscriptionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List event subscriptions operation. */ @Fluent -public final class SubscriptionsListResult { +public final class SubscriptionsListResult implements JsonSerializable { /* * A collection of Subscriptions. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of event subscriptions */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 SubscriptionsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionsListResult 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 SubscriptionsListResult. + */ + public static SubscriptionsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionsListResult deserializedSubscriptionsListResult = new SubscriptionsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SubscriptionInner.fromJson(reader1)); + deserializedSubscriptionsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSubscriptionsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionsListResult; + }); + } } 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 324d7d4534566..78ac3058910a4 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/SystemTopicUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicUpdateParameters.java index 0cbbb85137482..ddbe3be5339d6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicUpdateParameters.java @@ -5,26 +5,26 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import 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 System Topic update. */ @Fluent -public final class SystemTopicUpdateParameters { +public final class SystemTopicUpdateParameters implements JsonSerializable { /* * Tags of the system topic. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Resource identity information. */ - @JsonProperty(value = "identity") private IdentityInfo identity; /** @@ -83,4 +83,44 @@ public void validate() { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SystemTopicUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SystemTopicUpdateParameters 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 SystemTopicUpdateParameters. + */ + public static SystemTopicUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SystemTopicUpdateParameters deserializedSystemTopicUpdateParameters = new SystemTopicUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSystemTopicUpdateParameters.tags = tags; + } else if ("identity".equals(fieldName)) { + deserializedSystemTopicUpdateParameters.identity = IdentityInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSystemTopicUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicsListResult.java index 98a366e31314e..f7c30ef38643b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicsListResult.java @@ -5,25 +5,27 @@ 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.SystemTopicInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List System topics operation. */ @Fluent -public final class SystemTopicsListResult { +public final class SystemTopicsListResult implements JsonSerializable { /* * A collection of system Topics. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of topics. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 SystemTopicsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SystemTopicsListResult 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 SystemTopicsListResult. + */ + public static SystemTopicsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SystemTopicsListResult deserializedSystemTopicsListResult = new SystemTopicsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SystemTopicInner.fromJson(reader1)); + deserializedSystemTopicsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSystemTopicsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSystemTopicsListResult; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TlsVersion.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TlsVersion.java index 1c76dbd10f753..7688c19bf9bd6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TlsVersion.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TlsVersion.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public TlsVersion() { * @param name a name to look for. * @return the corresponding TlsVersion. */ - @JsonCreator public static TlsVersion fromString(String name) { return fromString(name, TlsVersion.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topic.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topic.java index 647d7bf351df0..b415b367fb20e 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 @@ -80,7 +80,7 @@ public interface Topic { 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. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicProvisioningState.java index 270b7d8e1c3dd..0c86a4b3919e3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public TopicProvisioningState() { * @param name a name to look for. * @return the corresponding TopicProvisioningState. */ - @JsonCreator public static TopicProvisioningState fromString(String name) { return fromString(name, TopicProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicRegenerateKeyRequest.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicRegenerateKeyRequest.java index 1a9dbddef371c..d0717e0c1548d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicRegenerateKeyRequest.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicRegenerateKeyRequest.java @@ -6,17 +6,20 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Topic regenerate share access key request. */ @Fluent -public final class TopicRegenerateKeyRequest { +public final class TopicRegenerateKeyRequest implements JsonSerializable { /* * Key name to regenerate key1 or key2 */ - @JsonProperty(value = "keyName", required = true) private String keyName; /** @@ -59,4 +62,41 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(TopicRegenerateKeyRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyName", this.keyName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopicRegenerateKeyRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicRegenerateKeyRequest 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 TopicRegenerateKeyRequest. + */ + public static TopicRegenerateKeyRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicRegenerateKeyRequest deserializedTopicRegenerateKeyRequest = new TopicRegenerateKeyRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyName".equals(fieldName)) { + deserializedTopicRegenerateKeyRequest.keyName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTopicRegenerateKeyRequest; + }); + } } 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 beed976a01654..696b1c25401ac 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/TopicSpaceProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaceProvisioningState.java index f5c7c0ee9e275..fd2b3a03b0426 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaceProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaceProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -62,7 +61,6 @@ public TopicSpaceProvisioningState() { * @param name a name to look for. * @return the corresponding TopicSpaceProvisioningState. */ - @JsonCreator public static TopicSpaceProvisioningState fromString(String name) { return fromString(name, TopicSpaceProvisioningState.class); } 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 c55bbe554a527..7107136af1b1c 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 @@ -5,70 +5,67 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 Topic Spaces Configuration. */ @Fluent -public final class TopicSpacesConfiguration { +public final class TopicSpacesConfiguration implements JsonSerializable { /* * Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled. */ - @JsonProperty(value = "state") private TopicSpacesConfigurationState state; /* - * Fully qualified Azure Resource Id for the Event Grid Topic to which events will be routed to from TopicSpaces under a namespace. - * This property should be in the following format '/subscriptions/{subId}/resourcegroups/{resourceGroupName}/providers/microsoft.EventGrid/topics/{topicName}'. + * Fully qualified Azure Resource Id for the Event Grid Topic to which events will be routed to from TopicSpaces + * under a namespace. + * This property should be in the following format + * '/subscriptions/{subId}/resourcegroups/{resourceGroupName}/providers/microsoft.EventGrid/topics/{topicName}'. * This topic should reside in the same region where namespace is located. */ - @JsonProperty(value = "routeTopicResourceId") private String routeTopicResourceId; /* * The endpoint for the topic spaces configuration. This is a read-only property. */ - @JsonProperty(value = "hostname", access = JsonProperty.Access.WRITE_ONLY) private String hostname; /* * Routing enrichments for topic spaces configuration */ - @JsonProperty(value = "routingEnrichments") private RoutingEnrichments routingEnrichments; /* * Client authentication settings for topic spaces configuration. */ - @JsonProperty(value = "clientAuthentication") private ClientAuthenticationSettings clientAuthentication; /* * The maximum session expiry in hours. The property default value is 1 hour. * Min allowed value is 1 hour and max allowed value is 8 hours. */ - @JsonProperty(value = "maximumSessionExpiryInHours") private Integer maximumSessionExpiryInHours; /* * The maximum number of sessions per authentication name. The property default value is 1. * Min allowed value is 1 and max allowed value is 100. */ - @JsonProperty(value = "maximumClientSessionsPerAuthenticationName") private Integer maximumClientSessionsPerAuthenticationName; /* * Routing identity info for topic spaces configuration. */ - @JsonProperty(value = "routingIdentityInfo") private RoutingIdentityInfo routingIdentityInfo; /* * List of custom domain configurations for the namespace. */ - @JsonProperty(value = "customDomains") private List customDomains; /** @@ -282,4 +279,70 @@ public void validate() { customDomains().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + 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); + jsonWriter.writeJsonField("routingIdentityInfo", this.routingIdentityInfo); + jsonWriter.writeArrayField("customDomains", this.customDomains, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopicSpacesConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicSpacesConfiguration 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 TopicSpacesConfiguration. + */ + public static TopicSpacesConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicSpacesConfiguration deserializedTopicSpacesConfiguration = new TopicSpacesConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedTopicSpacesConfiguration.state + = TopicSpacesConfigurationState.fromString(reader.getString()); + } else if ("routeTopicResourceId".equals(fieldName)) { + deserializedTopicSpacesConfiguration.routeTopicResourceId = reader.getString(); + } else if ("hostname".equals(fieldName)) { + deserializedTopicSpacesConfiguration.hostname = reader.getString(); + } else if ("routingEnrichments".equals(fieldName)) { + deserializedTopicSpacesConfiguration.routingEnrichments = RoutingEnrichments.fromJson(reader); + } else if ("clientAuthentication".equals(fieldName)) { + deserializedTopicSpacesConfiguration.clientAuthentication + = ClientAuthenticationSettings.fromJson(reader); + } else if ("maximumSessionExpiryInHours".equals(fieldName)) { + deserializedTopicSpacesConfiguration.maximumSessionExpiryInHours + = reader.getNullable(JsonReader::getInt); + } else if ("maximumClientSessionsPerAuthenticationName".equals(fieldName)) { + deserializedTopicSpacesConfiguration.maximumClientSessionsPerAuthenticationName + = reader.getNullable(JsonReader::getInt); + } else if ("routingIdentityInfo".equals(fieldName)) { + deserializedTopicSpacesConfiguration.routingIdentityInfo = RoutingIdentityInfo.fromJson(reader); + } else if ("customDomains".equals(fieldName)) { + List customDomains + = reader.readArray(reader1 -> CustomDomainConfiguration.fromJson(reader1)); + deserializedTopicSpacesConfiguration.customDomains = customDomains; + } else { + reader.skipChildren(); + } + } + + return deserializedTopicSpacesConfiguration; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfigurationState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfigurationState.java index f519a36fa9e54..735967c316020 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfigurationState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfigurationState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public TopicSpacesConfigurationState() { * @param name a name to look for. * @return the corresponding TopicSpacesConfigurationState. */ - @JsonCreator public static TopicSpacesConfigurationState fromString(String name) { return fromString(name, TopicSpacesConfigurationState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesListResult.java index ef875d891d8fd..c85e16a3b104d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesListResult.java @@ -5,25 +5,27 @@ 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.TopicSpaceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Topic Space operation. */ @Fluent -public final class TopicSpacesListResult { +public final class TopicSpacesListResult implements JsonSerializable { /* * A collection of Topic Space. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of Topic Space. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 TopicSpacesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicSpacesListResult 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 TopicSpacesListResult. + */ + public static TopicSpacesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicSpacesListResult deserializedTopicSpacesListResult = new TopicSpacesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> TopicSpaceInner.fromJson(reader1)); + deserializedTopicSpacesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTopicSpacesListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTopicSpacesListResult; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeAdditionalEnforcedPermission.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeAdditionalEnforcedPermission.java index c8d099b80725a..eaf18d450b2a6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeAdditionalEnforcedPermission.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeAdditionalEnforcedPermission.java @@ -5,23 +5,26 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 TopicTypeAdditionalEnforcedPermission model. */ @Fluent -public final class TopicTypeAdditionalEnforcedPermission { +public final class TopicTypeAdditionalEnforcedPermission + implements JsonSerializable { /* * The permissionName property. */ - @JsonProperty(value = "permissionName") private String permissionName; /* * The isDataAction property. */ - @JsonProperty(value = "isDataAction") private Boolean isDataAction; /** @@ -77,4 +80,45 @@ public TopicTypeAdditionalEnforcedPermission withIsDataAction(Boolean isDataActi */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("permissionName", this.permissionName); + jsonWriter.writeBooleanField("isDataAction", this.isDataAction); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopicTypeAdditionalEnforcedPermission from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicTypeAdditionalEnforcedPermission 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 TopicTypeAdditionalEnforcedPermission. + */ + public static TopicTypeAdditionalEnforcedPermission fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicTypeAdditionalEnforcedPermission deserializedTopicTypeAdditionalEnforcedPermission + = new TopicTypeAdditionalEnforcedPermission(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("permissionName".equals(fieldName)) { + deserializedTopicTypeAdditionalEnforcedPermission.permissionName = reader.getString(); + } else if ("isDataAction".equals(fieldName)) { + deserializedTopicTypeAdditionalEnforcedPermission.isDataAction + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedTopicTypeAdditionalEnforcedPermission; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeProvisioningState.java index 5a315a3d898bb..a59299547b3f4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public TopicTypeProvisioningState() { * @param name a name to look for. * @return the corresponding TopicTypeProvisioningState. */ - @JsonCreator public static TopicTypeProvisioningState fromString(String name) { return fromString(name, TopicTypeProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeSourceScope.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeSourceScope.java index 84df63092b478..d005e836400ad 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeSourceScope.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeSourceScope.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -47,7 +46,6 @@ public TopicTypeSourceScope() { * @param name a name to look for. * @return the corresponding TopicTypeSourceScope. */ - @JsonCreator public static TopicTypeSourceScope fromString(String name) { return fromString(name, TopicTypeSourceScope.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypesListResult.java index 73f47e5203e4b..49a03d932489a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypesListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypesListResult.java @@ -5,19 +5,22 @@ 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.TopicTypeInfoInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Topic Types operation. */ @Fluent -public final class TopicTypesListResult { +public final class TopicTypesListResult implements JsonSerializable { /* * A collection of topic types */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,41 @@ public void validate() { 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)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopicTypesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicTypesListResult 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 TopicTypesListResult. + */ + public static TopicTypesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicTypesListResult deserializedTopicTypesListResult = new TopicTypesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> TopicTypeInfoInner.fromJson(reader1)); + deserializedTopicTypesListResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedTopicTypesListResult; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicUpdateParameters.java index 6f43fc6968a8d..1cad67d1f5a52 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicUpdateParameters.java @@ -5,9 +5,12 @@ 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.TopicUpdateParameterProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -15,30 +18,25 @@ * Properties of the Topic update. */ @Fluent -public final class TopicUpdateParameters { +public final class TopicUpdateParameters implements JsonSerializable { /* * Tags of the Topic resource. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Topic resource identity information. */ - @JsonProperty(value = "identity") private IdentityInfo identity; /* * Properties of the Topic resource. */ - @JsonProperty(value = "properties") private TopicUpdateParameterProperties innerProperties; /* * The Sku pricing tier for the topic. */ - @JsonProperty(value = "sku") private ResourceSku sku; /** @@ -286,4 +284,50 @@ public void validate() { sku().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("sku", this.sku); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopicUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicUpdateParameters 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 TopicUpdateParameters. + */ + public static TopicUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicUpdateParameters deserializedTopicUpdateParameters = new TopicUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedTopicUpdateParameters.tags = tags; + } else if ("identity".equals(fieldName)) { + 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(); + } + } + + return deserializedTopicUpdateParameters; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsConfiguration.java index 30ad68b71b1cf..cbe25ae572812 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsConfiguration.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsConfiguration.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 Topics Configuration. */ @Fluent -public final class TopicsConfiguration { +public final class TopicsConfiguration implements JsonSerializable { /* * The hostname for the topics configuration. This is a read-only property. */ - @JsonProperty(value = "hostname", access = JsonProperty.Access.WRITE_ONLY) private String hostname; /* * List of custom domain configurations for the namespace. */ - @JsonProperty(value = "customDomains") private List customDomains; /** @@ -70,4 +72,44 @@ public void validate() { customDomains().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("customDomains", this.customDomains, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopicsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicsConfiguration 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 TopicsConfiguration. + */ + public static TopicsConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicsConfiguration deserializedTopicsConfiguration = new TopicsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hostname".equals(fieldName)) { + deserializedTopicsConfiguration.hostname = reader.getString(); + } else if ("customDomains".equals(fieldName)) { + List customDomains + = reader.readArray(reader1 -> CustomDomainConfiguration.fromJson(reader1)); + deserializedTopicsConfiguration.customDomains = customDomains; + } else { + reader.skipChildren(); + } + } + + return deserializedTopicsConfiguration; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsListResult.java index b1e2b9383d7fd..edadb20b18bf7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsListResult.java @@ -5,25 +5,27 @@ 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.TopicInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List Topics operation. */ @Fluent -public final class TopicsListResult { +public final class TopicsListResult implements JsonSerializable { /* * A collection of Topics */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of topics */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { 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 TopicsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopicsListResult 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 TopicsListResult. + */ + public static TopicsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopicsListResult deserializedTopicsListResult = new TopicsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> TopicInner.fromJson(reader1)); + deserializedTopicsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTopicsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTopicsListResult; + }); + } } 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 f827748485c88..468617956599e 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 @@ -5,62 +5,59 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 topic spaces configuration info of a namespace. */ @Fluent -public final class UpdateTopicSpacesConfigurationInfo { +public final class UpdateTopicSpacesConfigurationInfo implements JsonSerializable { /* * Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled. */ - @JsonProperty(value = "state") private TopicSpacesConfigurationState state; /* - * This property is used to specify custom topic to which events will be routed to from topic spaces configuration under namespace. + * This property is used to specify custom topic to which events will be routed to from topic spaces configuration + * under namespace. */ - @JsonProperty(value = "routeTopicResourceId") private String routeTopicResourceId; /* * Routing enrichments for topic spaces configuration. */ - @JsonProperty(value = "routingEnrichments") private RoutingEnrichments routingEnrichments; /* * Client authentication settings for topic spaces configuration. */ - @JsonProperty(value = "clientAuthentication") private ClientAuthenticationSettings clientAuthentication; /* * The maximum session expiry in hours. The property default value is 1 hour. * Min allowed value is 1 hour and max allowed value is 8 hours. */ - @JsonProperty(value = "maximumSessionExpiryInHours") private Integer maximumSessionExpiryInHours; /* * The maximum number of sessions per authentication name. The property default value is 1. * Min allowed value is 1 and max allowed value is 100. */ - @JsonProperty(value = "maximumClientSessionsPerAuthenticationName") private Integer maximumClientSessionsPerAuthenticationName; /* * Routing identity info for topic spaces configuration. */ - @JsonProperty(value = "routingIdentityInfo") private RoutingIdentityInfo routingIdentityInfo; /* * Custom domain info for topic spaces configuration. */ - @JsonProperty(value = "customDomains") private List customDomains; /** @@ -260,4 +257,71 @@ public void validate() { customDomains().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + 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); + jsonWriter.writeJsonField("routingIdentityInfo", this.routingIdentityInfo); + jsonWriter.writeArrayField("customDomains", this.customDomains, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateTopicSpacesConfigurationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateTopicSpacesConfigurationInfo 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 UpdateTopicSpacesConfigurationInfo. + */ + public static UpdateTopicSpacesConfigurationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateTopicSpacesConfigurationInfo deserializedUpdateTopicSpacesConfigurationInfo + = new UpdateTopicSpacesConfigurationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedUpdateTopicSpacesConfigurationInfo.state + = TopicSpacesConfigurationState.fromString(reader.getString()); + } else if ("routeTopicResourceId".equals(fieldName)) { + deserializedUpdateTopicSpacesConfigurationInfo.routeTopicResourceId = reader.getString(); + } 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); + } else if ("maximumClientSessionsPerAuthenticationName".equals(fieldName)) { + deserializedUpdateTopicSpacesConfigurationInfo.maximumClientSessionsPerAuthenticationName + = reader.getNullable(JsonReader::getInt); + } else if ("routingIdentityInfo".equals(fieldName)) { + deserializedUpdateTopicSpacesConfigurationInfo.routingIdentityInfo + = RoutingIdentityInfo.fromJson(reader); + } else if ("customDomains".equals(fieldName)) { + List customDomains + = reader.readArray(reader1 -> CustomDomainConfiguration.fromJson(reader1)); + deserializedUpdateTopicSpacesConfigurationInfo.customDomains = customDomains; + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateTopicSpacesConfigurationInfo; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicsConfigurationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicsConfigurationInfo.java index 38d916eef0a84..745255faaf7fb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicsConfigurationInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicsConfigurationInfo.java @@ -5,18 +5,21 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 topics configuration info of a namespace. */ @Fluent -public final class UpdateTopicsConfigurationInfo { +public final class UpdateTopicsConfigurationInfo implements JsonSerializable { /* * Custom domain info for topics configuration. */ - @JsonProperty(value = "customDomains") private List customDomains; /** @@ -55,4 +58,43 @@ public void validate() { customDomains().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("customDomains", this.customDomains, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateTopicsConfigurationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateTopicsConfigurationInfo 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 UpdateTopicsConfigurationInfo. + */ + public static UpdateTopicsConfigurationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateTopicsConfigurationInfo deserializedUpdateTopicsConfigurationInfo + = new UpdateTopicsConfigurationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("customDomains".equals(fieldName)) { + List customDomains + = reader.readArray(reader1 -> CustomDomainConfiguration.fromJson(reader1)); + deserializedUpdateTopicsConfigurationInfo.customDomains = customDomains; + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateTopicsConfigurationInfo; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UserIdentityProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UserIdentityProperties.java index 3c17f3496601d..592dc23c2a1b3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UserIdentityProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UserIdentityProperties.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 information about the user identity. */ @Fluent -public final class UserIdentityProperties { +public final class UserIdentityProperties implements JsonSerializable { /* * The principal id of user assigned identity. */ - @JsonProperty(value = "principalId") private String principalId; /* * The client id of user assigned identity. */ - @JsonProperty(value = "clientId") private String clientId; /** @@ -77,4 +79,43 @@ public UserIdentityProperties withClientId(String clientId) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("principalId", this.principalId); + jsonWriter.writeStringField("clientId", this.clientId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserIdentityProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserIdentityProperties 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 UserIdentityProperties. + */ + public static UserIdentityProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserIdentityProperties deserializedUserIdentityProperties = new UserIdentityProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedUserIdentityProperties.principalId = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedUserIdentityProperties.clientId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUserIdentityProperties; + }); + } } 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 405625a9e96a8..06b2592deb8af 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. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnerProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnerProvisioningState.java index e540a76e49dc3..de5640768e3f7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnerProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnerProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.eventgrid.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public VerifiedPartnerProvisioningState() { * @param name a name to look for. * @return the corresponding VerifiedPartnerProvisioningState. */ - @JsonCreator public static VerifiedPartnerProvisioningState fromString(String name) { return fromString(name, VerifiedPartnerProvisioningState.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnersListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnersListResult.java index 32e7f7e9eaa7c..fc28b69aab66a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnersListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnersListResult.java @@ -5,25 +5,27 @@ 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.VerifiedPartnerInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the List verified partners operation. */ @Fluent -public final class VerifiedPartnersListResult { +public final class VerifiedPartnersListResult implements JsonSerializable { /* * A collection of verified partners. */ - @JsonProperty(value = "value") private List value; /* * A link for the next page of verified partners if any. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,45 @@ public void validate() { 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 VerifiedPartnersListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VerifiedPartnersListResult 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 VerifiedPartnersListResult. + */ + public static VerifiedPartnersListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VerifiedPartnersListResult deserializedVerifiedPartnersListResult = new VerifiedPartnersListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> VerifiedPartnerInner.fromJson(reader1)); + deserializedVerifiedPartnersListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVerifiedPartnersListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVerifiedPartnersListResult; + }); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookEventSubscriptionDestination.java index 2241ab18b6f1b..6a11c2aacef1a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookEventSubscriptionDestination.java @@ -5,35 +5,26 @@ 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.WebhookEventSubscriptionDestinationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; import java.util.List; /** * Information about the webhook destination for an event subscription. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = WebhookEventSubscriptionDestination.class, - visible = true) -@JsonTypeName("WebHook") @Fluent public final class WebhookEventSubscriptionDestination extends EventSubscriptionDestination { /* * Type of the endpoint for the event subscription destination. */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private EndpointType endpointType = EndpointType.WEB_HOOK; /* * WebHook Properties of the event subscription destination. */ - @JsonProperty(value = "properties") private WebhookEventSubscriptionDestinationProperties innerProperties; /** @@ -246,9 +237,50 @@ public WebhookEventSubscriptionDestination withMinimumTlsVersionAllowed(TlsVersi */ @Override public void validate() { - super.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 WebhookEventSubscriptionDestination from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebhookEventSubscriptionDestination 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 WebhookEventSubscriptionDestination. + */ + public static WebhookEventSubscriptionDestination fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebhookEventSubscriptionDestination deserializedWebhookEventSubscriptionDestination + = new WebhookEventSubscriptionDestination(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedWebhookEventSubscriptionDestination.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedWebhookEventSubscriptionDestination.innerProperties + = WebhookEventSubscriptionDestinationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWebhookEventSubscriptionDestination; + }); + } } 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 index 7fded3c31843e..2267bde3743b0 100644 --- 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 @@ -5,35 +5,26 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; import java.util.List; /** * Information about the WebHook of the partner destination. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = WebhookPartnerDestinationInfo.class, - visible = true) -@JsonTypeName("WebHook") @Fluent public final class WebhookPartnerDestinationInfo extends PartnerDestinationInfo { /* * Type of the endpoint for the partner destination */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private PartnerEndpointType endpointType = PartnerEndpointType.WEB_HOOK; /* * WebHook Properties of the partner destination. */ - @JsonProperty(value = "properties") private WebhookPartnerDestinationProperties innerProperties; /** @@ -183,9 +174,71 @@ public WebhookPartnerDestinationInfo withClientAuthentication(PartnerClientAuthe */ @Override public void validate() { - super.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 index 400ed72d53be7..6ceb627947bbb 100644 --- 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 @@ -5,34 +5,25 @@ 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 com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.IOException; /** * Information about the update of the WebHook of the partner destination. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "endpointType", - defaultImpl = WebhookUpdatePartnerDestinationInfo.class, - visible = true) -@JsonTypeName("WebHook") @Fluent public final class WebhookUpdatePartnerDestinationInfo extends PartnerUpdateDestinationInfo { /* * Type of the endpoint for the partner destination */ - @JsonTypeId - @JsonProperty(value = "endpointType", required = true) private PartnerEndpointType endpointType = PartnerEndpointType.WEB_HOOK; /* * WebHook Properties of the partner destination. */ - @JsonProperty(value = "properties") private WebhookPartnerDestinationProperties innerProperties; /** @@ -137,9 +128,50 @@ public PartnerClientAuthentication clientAuthentication() { */ @Override public void validate() { - super.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/java/module-info.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/module-info.java index 8c71810489175..f7a83ae8941a4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/module-info.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/module-info.java @@ -4,10 +4,12 @@ module com.azure.resourcemanager.eventgrid { requires transitive com.azure.core.management; + exports com.azure.resourcemanager.eventgrid; exports com.azure.resourcemanager.eventgrid.fluent; exports com.azure.resourcemanager.eventgrid.fluent.models; exports com.azure.resourcemanager.eventgrid.models; - opens com.azure.resourcemanager.eventgrid.fluent.models to com.azure.core, com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.eventgrid.models to com.azure.core, com.fasterxml.jackson.databind; -} \ No newline at end of file + + opens com.azure.resourcemanager.eventgrid.fluent.models to com.azure.core; + opens com.azure.resourcemanager.eventgrid.models to com.azure.core; +} 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 b854e8dbff213..e3b65b62f87fb 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.DomainsClientImpl$DomainsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.DomainTopicsClientImpl$DomainTopicsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.DomainTopicEventSubscriptionsClientImpl$DomainTopicEventSubscriptionsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.TopicEventSubscriptionsClientImpl$TopicEventSubscriptionsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.DomainEventSubscriptionsClientImpl$DomainEventSubscriptionsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.EventSubscriptionsClientImpl$EventSubscriptionsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.SystemTopicEventSubscriptionsClientImpl$SystemTopicEventSubscriptionsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.NamespaceTopicEventSubscriptionsClientImpl$NamespaceTopicEventSubscriptionsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.PartnerTopicEventSubscriptionsClientImpl$PartnerTopicEventSubscriptionsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.NamespacesClientImpl$NamespacesService" ], [ "com.azure.resourcemanager.eventgrid.implementation.NamespaceTopicsClientImpl$NamespaceTopicsService" ], [ "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.PartnerTopicsClientImpl$PartnerTopicsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService" ], [ "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.SystemTopicsClientImpl$SystemTopicsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.TopicsClientImpl$TopicsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.ExtensionTopicsClientImpl$ExtensionTopicsService" ], [ "com.azure.resourcemanager.eventgrid.implementation.TopicSpacesClientImpl$TopicSpacesService" ], [ "com.azure.resourcemanager.eventgrid.implementation.TopicTypesClientImpl$TopicTypesService" ], [ "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.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 diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventgrid/reflect-config.json b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventgrid/reflect-config.json index 610d8c6b5596c..0637a088a01e8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventgrid/reflect-config.json +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventgrid/reflect-config.json @@ -1,1581 +1 @@ -[ { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.CaCertificatesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.ChannelInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.ChannelProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventTypeInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.InlineEventProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ResourceMoveChangeHistory", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ChannelUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.ChannelUpdateParametersProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerUpdateDestinationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerUpdateTopicInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ChannelsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ClientGroupsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.ClientInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.ClientProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ClientCertificateAuthentication", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ClientsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.DomainInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.DomainProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PrivateEndpoint", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ConnectionState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.InputSchemaMapping", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.InboundIpRule", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ResourceSku", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.IdentityInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.UserIdentityProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DomainUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.DomainUpdateParameterProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DomainsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.DomainSharedAccessKeysInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DomainRegenerateKeyRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.DomainTopicInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.DomainTopicProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DomainTopicsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.DeliveryAttributeListResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.QueueInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DeadLetterDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PushInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DeliveryWithResourceIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventSubscriptionDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.FiltersConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.Filter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.SubscriptionUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionUpdateParametersProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.SubscriptionsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.AdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.RetryPolicy", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventSubscriptionsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NamespaceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicsConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.CustomDomainConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.CustomDomainIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.RoutingEnrichments", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StaticRoutingEnrichment", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DynamicRoutingEnrichment", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ClientAuthenticationSettings", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationSettings", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.IssuerCertificateInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationManagedIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.RoutingIdentityInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NamespaceSku", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NamespaceUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NamespaceUpdateParameterProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.UpdateTopicSpacesConfigurationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.UpdateTopicsConfigurationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NamespacesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NamespaceSharedAccessKeysInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NamespaceTopicUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicUpdateParameterProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NamespaceTopicsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.TopicSharedAccessKeysInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.OperationsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.OperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.OperationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerAuthorization", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.Partner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerConfigurationUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationUpdateParameterProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerConfigurationsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerDestinationUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerDestinationsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerNamespaceUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceUpdateParameterProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerNamespacesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceSharedAccessKeysInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerNamespaceRegenerateKeyRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerRegistrationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerRegistrationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerRegistrationUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerRegistrationsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerTopicInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerTopicProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerTopicUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerTopicsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssues", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationIssuesProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ResourceAssociation", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationProfile", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRule", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterProfileAccessRuleProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterSubscription", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PermissionBindingsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PrivateLinkResourceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PrivateLinkResourceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PrivateLinkResourcesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.SystemTopicInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.SystemTopicProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.SystemTopicUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.SystemTopicsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.TopicInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.TopicProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ExtendedLocation", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.TopicUpdateParameterProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventTypesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.EventTypeInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.EventTypeProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.ExtensionTopicInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.ExtensionTopicProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicSpacesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicTypesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.TopicTypeInfoInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.TopicTypeProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicTypeAdditionalEnforcedPermission", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.VerifiedPartnerInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.VerifiedPartnerProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerDetails", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.VerifiedPartnersListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.CustomDomainOwnershipValidationResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionFullUrlInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.WebhookPartnerDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerClientAuthentication", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.AzureADPartnerClientAuthenticationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.AzureADPartnerClientAuthentication", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.WebhookPartnerDestinationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.WebhookUpdatePartnerDestinationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.JsonInputSchemaMappingProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.JsonField", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.JsonFieldWithDefault", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.JsonInputSchemaMapping", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.StaticDeliveryAttributeMappingProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StaticDeliveryAttributeMapping", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.DynamicDeliveryAttributeMappingProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DynamicDeliveryAttributeMapping", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.StorageBlobDeadLetterDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StorageBlobDeadLetterDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberInFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberNotInFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberLessThanFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberGreaterThanFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberLessThanOrEqualsFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberGreaterThanOrEqualsFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.BoolEqualsFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringInFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringNotInFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringBeginsWithFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringEndsWithFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringContainsFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberInRangeFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberNotInRangeFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringNotBeginsWithFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringNotEndsWithFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringNotContainsFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.IsNullOrUndefinedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.IsNotNullFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.WebhookEventSubscriptionDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberInAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberNotInAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberLessThanAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberGreaterThanAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberLessThanOrEqualsAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberGreaterThanOrEqualsAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.BoolEqualsAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringInAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringNotInAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringBeginsWithAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringEndsWithAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringContainsAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberInRangeAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NumberNotInRangeAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringNotBeginsWithAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringNotEndsWithAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StringNotContainsAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.IsNullOrUndefinedAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.IsNotNullAdvancedFilter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.EventHubEventSubscriptionDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventHubEventSubscriptionDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.StorageQueueEventSubscriptionDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StorageQueueEventSubscriptionDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.HybridConnectionEventSubscriptionDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.HybridConnectionEventSubscriptionDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.ServiceBusQueueEventSubscriptionDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ServiceBusQueueEventSubscriptionDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.ServiceBusTopicEventSubscriptionDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ServiceBusTopicEventSubscriptionDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.AzureFunctionEventSubscriptionDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.AzureFunctionEventSubscriptionDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.PartnerEventSubscriptionDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerEventSubscriptionDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.MonitorAlertEventSubscriptionDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.MonitorAlertEventSubscriptionDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicEventSubscriptionDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NamespaceTopicEventSubscriptionDestination", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StaticStringRoutingEnrichment", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.CaCertificateProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ChannelType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventDefinitionKind", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerEndpointType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ReadinessState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ClientGroupProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ClientCertificateValidationScheme", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ClientState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ClientProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PersistedConnectionStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DomainProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TlsVersion", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.InputSchema", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.InputSchemaMappingType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.IpActionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.Sku", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.IdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DomainTopicProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMappingType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.SubscriptionProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DeliveryMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DeadLetterEndPointType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EndpointType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.DeliverySchema", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.FilterOperatorType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventSubscriptionProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.AdvancedFilterOperatorType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventDeliverySchema", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NamespaceProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.CustomDomainValidationState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.CustomDomainIdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicSpacesConfigurationState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.StaticRoutingEnrichmentType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.AlternativeAuthenticationNameSource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationManagedIdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.RoutingIdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.SkuName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NamespaceTopicProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PublisherType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.EventInputSchema", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerConfigurationProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerDestinationProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerNamespaceProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerRegistrationProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerTopicProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterAssociationAccessMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRuleDirection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PermissionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PermissionBindingProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ResourceKind", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicSpaceProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.ResourceRegionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicTypeProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.TopicTypeSourceScope", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.PartnerClientAuthenticationType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.eventgrid.models.MonitorAlertSeverity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -} ] \ No newline at end of file +[] \ 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 57bbfa451a0ef..d4462d97a5e81 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,7 +9,9 @@ */ public final class CaCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * CaCertificates_CreateOrUpdate.json */ /** * Sample code: CaCertificates_CreateOrUpdate. 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 33b1e569d8f4f..c7e1a2933ebaf 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 @@ -9,7 +9,9 @@ */ public final class CaCertificatesDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 565ec48728ae5..3b9853b17bc36 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 @@ -9,7 +9,9 @@ */ public final class CaCertificatesGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 e774464379caf..8bce8446405c2 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,7 +9,9 @@ */ public final class CaCertificatesListByNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_ListByNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * CaCertificates_ListByNamespace.json */ /** * Sample code: CaCertificates_ListByNamespace. 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 e365f2f2abb62..0b659427f5c45 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 @@ -13,7 +13,9 @@ */ public final class ChannelsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Channels_CreateOrUpdate.json */ /** * Sample code: Channels_CreateOrUpdate. 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 fb5dda083b46d..aa528ac13b8e3 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 @@ -9,7 +9,9 @@ */ public final class ChannelsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 350dc3df929bf..1df33072cec1c 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 @@ -9,7 +9,9 @@ */ public final class ChannelsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 ddda442e76370..29ad90544c58b 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 @@ -9,7 +9,9 @@ */ public final class ChannelsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 d4403df78d260..3bdac3f0f26d5 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,7 +9,9 @@ */ public final class ChannelsListByPartnerNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_ListByPartnerNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Channels_ListByPartnerNamespace.json */ /** * Sample code: Channels_ListByPartnerNamespace. 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 3f5cfd79b3994..cb200579b6f9b 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 @@ -12,7 +12,9 @@ */ public final class ChannelsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 fc10174abcb1e..5792df9553278 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,7 +9,9 @@ */ public final class ClientGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * ClientGroups_CreateOrUpdate.json */ /** * Sample code: ClientGroups_CreateOrUpdate. 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 bc0835d9a41de..a647b62fcf569 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 @@ -9,7 +9,9 @@ */ public final class ClientGroupsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 810c4ee5fc61a..85937785d1e3a 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 @@ -9,7 +9,9 @@ */ public final class ClientGroupsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 2e5eb4da508ab..6ca7fe6ed17d4 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,7 +9,9 @@ */ public final class ClientGroupsListByNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_ListByNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * ClientGroups_ListByNamespace.json */ /** * Sample code: ClientGroups_ListByNamespace. 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 f95c0866f2d4c..318a81c87c51c 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 @@ -18,7 +18,9 @@ */ public final class ClientsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 9adb11d117730..b046ac86cd0f0 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 @@ -9,7 +9,9 @@ */ public final class ClientsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 dcf9e920210af..4266312b3d32d 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 @@ -9,7 +9,8 @@ */ public final class ClientsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 8125d219b3138..1b0c5ddfb74e1 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 @@ -9,7 +9,9 @@ */ public final class ClientsListByNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_ListByNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 cd840417b406a..f30c98151a241 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,7 +13,9 @@ */ public final class DomainEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: DomainEventSubscriptions_CreateOrUpdate. 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 69ece996b8000..7fe44349672c2 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,7 +9,9 @@ */ public final class DomainEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_Delete.json */ /** * Sample code: DomainEventSubscriptions_Delete. 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 3419dad346bdc..79484a840dd9e 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,7 +9,9 @@ */ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: DomainEventSubscriptions_GetDeliveryAttributes. 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 44353e69a65ba..d78d7cf3b656b 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,7 +9,9 @@ */ public final class DomainEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_GetFullUrl.json */ /** * Sample code: DomainEventSubscriptions_GetFullUrl. 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 07c23f1a97902..91e5b21d6f739 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,7 +9,9 @@ */ public final class DomainEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_Get.json */ /** * Sample code: DomainEventSubscriptions_Get. 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 d84e44561a4bc..ec2fe93ba5616 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,7 +9,9 @@ */ public final class DomainEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_List.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_List.json */ /** * Sample code: DomainEventSubscriptions_List. 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 8faf2bd2f9d8f..4b6cf23929664 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,7 +14,9 @@ */ public final class DomainEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainEventSubscriptions_Update.json */ /** * Sample code: DomainEventSubscriptions_Update. 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 4f3f9e1bdb42a..035dc2540318e 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,7 +13,9 @@ */ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: DomainTopicEventSubscriptions_CreateOrUpdate. 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 57ab2682cf0a5..2ec3c285a4294 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,7 +9,9 @@ */ public final class DomainTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_Delete.json */ /** * Sample code: DomainTopicEventSubscriptions_Delete. 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 56dd3265230a4..9e4d1141a4b4e 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,7 +9,9 @@ */ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: DomainTopicEventSubscriptions_GetDeliveryAttributes. 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 a2a1aaaaee620..0d7a25566670e 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,7 +9,9 @@ */ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: DomainTopicEventSubscriptions_GetFullUrl. 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 209c0b3c1b08d..dae86ed3d82f6 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,7 +9,9 @@ */ public final class DomainTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_Get.json */ /** * Sample code: DomainTopicEventSubscriptions_Get. 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 938a52b5aebe9..79300affa5291 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,7 +9,9 @@ */ public final class DomainTopicEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_List.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_List.json */ /** * Sample code: DomainTopicEventSubscriptions_List. 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 7c6a42f8041ca..464ea0cd03922 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,7 +14,9 @@ */ public final class DomainTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopicEventSubscriptions_Update.json */ /** * Sample code: DomainTopicEventSubscriptions_Update. 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 48ecef269eee1..49cc30ca814fe 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,7 +9,9 @@ */ public final class DomainTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * DomainTopics_CreateOrUpdate.json */ /** * Sample code: DomainTopics_CreateOrUpdate. 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 8515b5b365b71..b876c9d9bbe42 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 @@ -9,7 +9,9 @@ */ public final class DomainTopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 ada164dee4624..d7c9f80b5ee43 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 @@ -9,7 +9,9 @@ */ public final class DomainTopicsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 3840eef0512ec..9d6f63d87df56 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 @@ -9,7 +9,9 @@ */ public final class DomainTopicsListByDomainSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_ListByDomain.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 965f209c55b02..7291218fbc5ea 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 @@ -16,7 +16,9 @@ */ public final class DomainsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Domains_CreateOrUpdate.json */ /** * Sample code: Domains_CreateOrUpdate. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteSamples.java index 57baae7a1b330..b172467ab2106 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 @@ -9,7 +9,9 @@ */ public final class DomainsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 97786d6910655..c8ffff2c17abd 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 @@ -9,7 +9,8 @@ */ public final class DomainsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 8401fd8794753..802a7a9d9a09f 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,7 +9,9 @@ */ public final class DomainsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Domains_ListByResourceGroup.json */ /** * Sample code: Domains_ListByResourceGroup. 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 e0968ca2e6244..e957ffb86119f 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,7 +9,9 @@ */ public final class DomainsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Domains_ListBySubscription.json */ /** * Sample code: Domains_ListBySubscription. 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 559af0d0e074e..bf0693685c044 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,7 +9,9 @@ */ public final class DomainsListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListSharedAccessKeys.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Domains_ListSharedAccessKeys.json */ /** * Sample code: Domains_ListSharedAccessKeys. 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 aa1e71fafc304..9d6973a847f28 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 @@ -11,7 +11,9 @@ */ public final class DomainsRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_RegenerateKey.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 4de662b95281a..b6f6c5865b1a8 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 @@ -17,7 +17,9 @@ */ public final class DomainsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 5f074c6cc159d..40bb7c0f735df 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,7 +20,9 @@ */ public final class EventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination. @@ -42,7 +44,9 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestinat } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForSubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForSubscription.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForSubscription. @@ -61,7 +65,9 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestinat } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination. @@ -87,7 +93,9 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForResource.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResource. @@ -110,7 +118,9 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic. @@ -132,7 +142,9 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResourceGroup. @@ -154,7 +166,9 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination. @@ -179,7 +193,9 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestina } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination. @@ -207,7 +223,9 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDes } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination. @@ -233,7 +251,9 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDe } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination. @@ -259,7 +279,9 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectio } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination. 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 99aa932c38c31..34c1d227a7fd9 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,7 +9,9 @@ */ public final class EventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForCustomTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_DeleteForCustomTopic.json */ /** * Sample code: EventSubscriptions_DeleteForCustomTopic. @@ -25,7 +27,9 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_DeleteForResourceGroup.json */ /** * Sample code: EventSubscriptions_DeleteForResourceGroup. @@ -40,7 +44,9 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForSubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_DeleteForSubscription.json */ /** * Sample code: EventSubscriptions_DeleteForSubscription. @@ -55,7 +61,9 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_DeleteForResource.json */ /** * Sample code: EventSubscriptions_DeleteForResource. 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 3ddbbf4253045..6f88278442c8c 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,7 +9,9 @@ */ public final class EventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: EventSubscriptions_GetDeliveryAttributes. 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 0157b4ff00ab9..6477d1275de6b 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,7 +9,9 @@ */ public final class EventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetFullUrlForResource.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResource. @@ -25,7 +27,9 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetFullUrlForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResourceGroup. @@ -40,7 +44,9 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForSubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetFullUrlForSubscription.json */ /** * Sample code: EventSubscriptions_GetFullUrlForSubscription. @@ -55,7 +61,9 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForCustomTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetFullUrlForCustomTopic.json */ /** * Sample code: EventSubscriptions_GetFullUrlForCustomTopic. 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 4b926f9b4ff7b..8f35711317757 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,7 +9,9 @@ */ public final class EventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_HybridConnectionDestination. @@ -25,7 +27,9 @@ public static void eventSubscriptionsGetForCustomTopicHybridConnectionDestinatio } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination. @@ -41,7 +45,9 @@ public static void eventSubscriptionsGetForCustomTopicServiceBusTopicDestination } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetForResourceGroup. @@ -56,7 +62,9 @@ public static void eventSubscriptionsGetForCustomTopicServiceBusTopicDestination } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_EventHubDestination. @@ -72,7 +80,9 @@ public static void eventSubscriptionsGetForCustomTopicEventHubDestination( } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForSubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForSubscription.json */ /** * Sample code: EventSubscriptions_GetForSubscription. @@ -87,7 +97,9 @@ public static void eventSubscriptionsGetForCustomTopicEventHubDestination( } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_WebhookDestination. @@ -103,7 +115,9 @@ public static void eventSubscriptionsGetForCustomTopicWebhookDestination( } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_AzureFunctionDestination. @@ -119,7 +133,9 @@ public static void eventSubscriptionsGetForCustomTopicAzureFunctionDestination( } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic. @@ -135,7 +151,9 @@ public static void eventSubscriptionsGetForCustomTopicAzureFunctionDestination( } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_StorageQueueDestination. @@ -151,7 +169,9 @@ public static void eventSubscriptionsGetForCustomTopicStorageQueueDestination( } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForResource.json */ /** * Sample code: EventSubscriptions_GetForResource. @@ -166,7 +186,9 @@ public static void eventSubscriptionsGetForResource(com.azure.resourcemanager.ev } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination. 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 d458ecbd2b749..dde15399fb19b 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,7 +9,9 @@ */ public final class EventSubscriptionsListByDomainTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListByDomainTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListByDomainTopic.json */ /** * Sample code: EventSubscriptions_ListByDomainTopic. 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 51624ecdb7895..a3dbf4fcab5a4 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,7 +9,9 @@ */ public final class EventSubscriptionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListGlobalByResourceGroup.json */ /** * Sample code: EventSubscriptions_ListGlobalByResourceGroup. 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 b5a529b2e2b7e..ac247c31957c7 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,7 +9,9 @@ */ public final class EventSubscriptionsListByResourceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListByResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListByResource.json */ /** * Sample code: EventSubscriptions_ListByResource. 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 c6abba730dcbe..c9f010931bf35 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,7 +9,9 @@ */ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroupForTopicType.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListGlobalByResourceGroupForTopicType.json */ /** * Sample code: EventSubscriptions_ListGlobalByResourceGroupForTopicType. 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 f319487ed30f0..04321fc910eab 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,7 +9,9 @@ */ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscriptionForTopicType.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListGlobalBySubscriptionForTopicType.json */ /** * Sample code: EventSubscriptions_ListGlobalBySubscriptionForTopicType. 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 32de8c220fd67..fea3105efed5d 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,7 +9,9 @@ */ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroupForTopicType.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListRegionalByResourceGroupForTopicType.json */ /** * Sample code: EventSubscriptions_ListRegionalByResourceGroupForTopicType. 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 071d2d52acd83..e375dec2e4041 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,7 +9,9 @@ */ public final class EventSubscriptionsListRegionalByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListRegionalByResourceGroup.json */ /** * Sample code: EventSubscriptions_ListRegionalByResourceGroup. 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 8697a166d5180..1393615c95c1f 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,7 +9,9 @@ */ public final class EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscriptionForTopicType.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListRegionalBySubscriptionForTopicType.json */ /** * Sample code: EventSubscriptions_ListRegionalBySubscriptionForTopicType. 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 25132cc89b3a5..9649260b68ad6 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,7 +9,9 @@ */ public final class EventSubscriptionsListRegionalBySubscriptionSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListRegionalBySubscription.json */ /** * Sample code: EventSubscriptions_ListRegionalBySubscription. 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 b5fdd943b8ca2..a53b67214af9d 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,7 +9,9 @@ */ public final class EventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_ListGlobalBySubscription.json */ /** * Sample code: EventSubscriptions_ListGlobalBySubscription. 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 637c065c16fe4..1e65c2e178a54 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,7 +21,9 @@ */ public final class EventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_EventHubDestination. @@ -45,7 +47,9 @@ public static void eventSubscriptionsUpdateForCustomTopicEventHubDestination( } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination. @@ -71,7 +75,9 @@ public static void eventSubscriptionsUpdateForCustomTopicAzureFunctionDestinatio } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_WebhookDestination. @@ -95,7 +101,9 @@ public static void eventSubscriptionsUpdateForCustomTopicWebhookDestination( } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination. @@ -123,7 +131,9 @@ public static void eventSubscriptionsUpdateForCustomTopicStorageQueueDestination } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination. @@ -147,7 +157,9 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestinat } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination. @@ -171,7 +183,9 @@ public static void eventSubscriptionsUpdateForCustomTopicHybridConnectionDestina } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination. @@ -197,7 +211,9 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic. @@ -221,7 +237,9 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForResource.json */ /** * Sample code: EventSubscriptions_UpdateForResource. @@ -245,7 +263,9 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_UpdateForResourceGroup. @@ -268,7 +288,9 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForSubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * EventSubscriptions_UpdateForSubscription.json */ /** * Sample code: EventSubscriptions_UpdateForSubscription. 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 a4e5d9f476007..75a6f20dc96dc 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 @@ -9,7 +9,9 @@ */ public final class ExtensionTopicsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ExtensionTopics_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * ExtensionTopics_Get.json */ /** * Sample code: ExtensionTopics_Get. 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 6801ff5b7aad7..4ba9f216e2a63 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,7 +15,9 @@ */ public final class NamespaceTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: NamespaceTopicEventSubscriptions_CreateOrUpdate. 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 e6f06e0cec2db..f829ee38b7468 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,7 +9,9 @@ */ public final class NamespaceTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_Delete.json */ /** * Sample code: NamespaceTopicEventSubscriptions_Delete. 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 519a894247682..5802f6a5c982a 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,7 +9,9 @@ */ public final class NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: NamespaceTopicEventSubscriptions_GetDeliveryAttributes. 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 f479f35581a7e..2934ea7ab670c 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,7 +9,9 @@ */ public final class NamespaceTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: NamespaceTopicEventSubscriptions_GetFullUrl. 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 1008ef15c4ed0..e8b6499fa625f 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,7 +9,9 @@ */ public final class NamespaceTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_Get.json */ /** * Sample code: NamespaceTopicEventSubscriptions_Get. 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 0997b9dd62fd3..589c22cd22e3f 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,7 +9,9 @@ */ public final class NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json */ /** * Sample code: NamespaceTopicEventSubscriptions_ListByNamespaceTopic. 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 60b1bf23a05d7..ec33fd5251fc2 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,7 +16,9 @@ */ public final class NamespaceTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopicEventSubscriptions_Update.json */ /** * Sample code: NamespaceTopicEventSubscriptions_Update. 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 687ce829c657f..369d7cf755143 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,7 +12,9 @@ */ public final class NamespaceTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopics_CreateOrUpdate.json */ /** * Sample code: NamespaceTopics_CreateOrUpdate. 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 143f4d0c41d6c..34da1954b3e4e 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 @@ -9,7 +9,9 @@ */ public final class NamespaceTopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 0ea96432011f0..2f74fc96101b2 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 @@ -9,7 +9,9 @@ */ public final class NamespaceTopicsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 4426ee6f00aa3..a1bed2b5ffe3e 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,7 +9,9 @@ */ public final class NamespaceTopicsListByNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_ListByNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopics_ListByNamespace.json */ /** * Sample code: NamespaceTopics_ListByNamespace. 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 84754b060290a..4f76431f95834 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,7 +9,9 @@ */ public final class NamespaceTopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_ListSharedAccessKeys.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopics_ListSharedAccessKeys.json */ /** * Sample code: NamespaceTopics_ListSharedAccessKeys. 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 ea4ae8ee4c2c8..2527f607ed8f0 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,7 +11,9 @@ */ public final class NamespaceTopicsRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_RegenerateKey.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NamespaceTopics_RegenerateKey.json */ /** * Sample code: NamespaceTopics_RegenerateKey. 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 109cb92744d2d..dd199b8b053ed 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 @@ -11,7 +11,9 @@ */ public final class NamespaceTopicsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 3a5439f0e28a7..847e9f3b11dc8 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 @@ -14,7 +14,9 @@ */ public final class NamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 80589a0a04af6..82d66182bdcdc 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 @@ -9,7 +9,9 @@ */ public final class NamespacesDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 d17e435efe575..9d78b34ac7c81 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 @@ -9,7 +9,9 @@ */ public final class NamespacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 9e20a4ad410a6..a6ea65a87edcb 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,7 +9,9 @@ */ public final class NamespacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_ListByResourceGroup.json */ /** * Sample code: Namespaces_ListByResourceGroup. 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 276f8b07dadbb..0ca6d5a2ad889 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,7 +9,9 @@ */ public final class NamespacesListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_ListBySubscription.json */ /** * Sample code: Namespaces_ListBySubscription. 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 0463f0ade0cab..c4d2b0982d235 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,7 +9,9 @@ */ public final class NamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListSharedAccessKeys.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_ListSharedAccessKeys.json */ /** * Sample code: Namespaces_ListSharedAccessKeys. 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 eb9572886a42d..e8730b513c9b7 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 @@ -11,7 +11,9 @@ */ public final class NamespacesRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_RegenerateKey.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 5e27d290e1b38..c4d484580b052 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 @@ -13,7 +13,9 @@ */ public final class NamespacesUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 1bacbe5e4ef83..6bf18aab0f923 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,7 +9,9 @@ */ public final class NamespacesValidateCustomDomainOwnershipSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ValidateCustomDomainOwnership.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Namespaces_ValidateCustomDomainOwnership.json */ /** * Sample code: Namespaces_ValidateCustomDomainOwnership. 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 index e033a3e614d9d..7184191a38413 100644 --- 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 @@ -11,7 +11,9 @@ */ public final class NetworkSecurityPerimeterConfigurationsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NetworkSecurityPerimeterConfigurations_Get.json */ /** * Sample code: NetworkSecurityPerimeterConfigurations_Get. 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 index 4588666130396..08638220af999 100644 --- 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 @@ -11,7 +11,9 @@ */ public final class NetworkSecurityPerimeterConfigurationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_List.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NetworkSecurityPerimeterConfigurations_List.json */ /** * Sample code: NetworkSecurityPerimeterConfigurations_List. 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 index 39fb28911c7a1..1b3e66b053b0d 100644 --- 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 @@ -11,7 +11,9 @@ */ public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_Reconcile.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * NetworkSecurityPerimeterConfigurations_Reconcile.json */ /** * Sample code: NetworkSecurityPerimeterConfigurations_Reconcile. 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 a6907c721b514..eeeba43c69e44 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 @@ -9,7 +9,9 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Operations_List.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 99d7492a178cc..6d6533dc632cb 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,7 +13,9 @@ */ public final class PartnerConfigurationsAuthorizePartnerSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_AuthorizePartner.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_AuthorizePartner.json */ /** * Sample code: PartnerConfigurations_AuthorizePartner. 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 c210b27126e9d..6979577ff6067 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,7 +16,9 @@ */ public final class PartnerConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_CreateOrUpdate.json */ /** * Sample code: PartnerConfigurations_CreateOrUpdate. 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 da2030b7a2d43..c7c6a24e436f8 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,7 +9,9 @@ */ public final class PartnerConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_Delete.json */ /** * Sample code: PartnerConfigurations_Delete. 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 23811eb1e1a19..0f21c5b10fb5b 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 @@ -9,7 +9,9 @@ */ public final class PartnerConfigurationsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 fb9bf181fd7b3..8cf59eb2343db 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,7 +9,9 @@ */ public final class PartnerConfigurationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_ListByResourceGroup.json */ /** * Sample code: PartnerConfigurations_ListByResourceGroup. 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 07f2b40966e58..2ab4099c09f15 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,7 +9,9 @@ */ public final class PartnerConfigurationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_ListBySubscription.json */ /** * Sample code: PartnerConfigurations_ListBySubscription. 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 fbd0bfc5e4735..c6bc48cc57891 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,7 +13,9 @@ */ public final class PartnerConfigurationsUnauthorizePartnerSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_UnauthorizePartner.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_UnauthorizePartner.json */ /** * Sample code: PartnerConfigurations_UnauthorizePartner. 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 b6684f503cfb5..925ec9d27e7c2 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,7 +13,9 @@ */ public final class PartnerConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerConfigurations_Update.json */ /** * Sample code: PartnerConfigurations_Update. 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 index 0235d8bb70c6a..ce0e73477c53b 100644 --- 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 @@ -9,7 +9,9 @@ */ public final class PartnerDestinationsActivateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Activate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_Activate.json */ /** * Sample code: PartnerDestinations_Activate. 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 index dee60c551ee04..8073efe54a335 100644 --- 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 @@ -12,7 +12,9 @@ */ public final class PartnerDestinationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_CreateOrUpdate.json */ /** * Sample code: PartnerDestinations_CreateOrUpdate. 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 index 676e23ee64233..f769387fffe64 100644 --- 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 @@ -9,7 +9,9 @@ */ public final class PartnerDestinationsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_Delete.json */ /** * Sample code: PartnerDestinations_Delete. 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 index e22042acc48c5..e2bd083b92521 100644 --- 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 @@ -9,7 +9,9 @@ */ public final class PartnerDestinationsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_Get.json */ /** * Sample code: PartnerDestinations_Get. 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 index bc8bd12d5f6d2..7dd63e19f534e 100644 --- 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 @@ -9,7 +9,9 @@ */ public final class PartnerDestinationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_ListByResourceGroup.json */ /** * Sample code: PartnerDestinations_ListByResourceGroup. 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 index b2f9a01070dea..d7e72b1a0752c 100644 --- 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 @@ -9,7 +9,9 @@ */ public final class PartnerDestinationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_ListBySubscription.json */ /** * Sample code: PartnerDestinations_ListBySubscription. 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 index 320b07dcd122d..e905f5a9ef975 100644 --- 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 @@ -13,7 +13,9 @@ */ public final class PartnerDestinationsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerDestinations_Update.json */ /** * Sample code: PartnerDestinations_Update. 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 3447458254c12..451e7f05423b5 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,7 +12,9 @@ */ public final class PartnerNamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_CreateOrUpdate.json */ /** * Sample code: PartnerNamespaces_CreateOrUpdate. 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 5c3c8f3499b9d..b517252bdb5bd 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 @@ -9,7 +9,9 @@ */ public final class PartnerNamespacesDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 05d38a5506714..bafb9a169ab29 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 @@ -9,7 +9,9 @@ */ public final class PartnerNamespacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 5fef59a9372d8..5e272d17886b5 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,7 +9,9 @@ */ public final class PartnerNamespacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_ListByResourceGroup.json */ /** * Sample code: PartnerNamespaces_ListByResourceGroup. 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 741ba3522ce23..278539e9e0913 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,7 +9,9 @@ */ public final class PartnerNamespacesListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_ListBySubscription.json */ /** * Sample code: PartnerNamespaces_ListBySubscription. 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 a870186be37c1..fabd812a19cdd 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,7 +9,9 @@ */ public final class PartnerNamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListSharedAccessKeys.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_ListSharedAccessKeys.json */ /** * Sample code: PartnerNamespaces_ListSharedAccessKeys. 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 95535b49118e8..ee762d789faaa 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,7 +11,9 @@ */ public final class PartnerNamespacesRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_RegenerateKey.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerNamespaces_RegenerateKey.json */ /** * Sample code: PartnerNamespaces_RegenerateKey. 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 c5b8bf677454f..b5873804cfec2 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 @@ -13,7 +13,9 @@ */ public final class PartnerNamespacesUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 103bb02a5d031..41e620ee11e65 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,7 +12,9 @@ */ public final class PartnerRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerRegistrations_CreateOrUpdate.json */ /** * Sample code: PartnerRegistrations_CreateOrUpdate. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteSamples.java index 974562b487a74..3292389707140 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,7 +9,9 @@ */ public final class PartnerRegistrationsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerRegistrations_Delete.json */ /** * Sample code: PartnerRegistrations_Delete. 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 4be8a448315f6..b147386b92a49 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 @@ -9,7 +9,9 @@ */ public final class PartnerRegistrationsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 9b1683efa4962..307a3c0d8c438 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,7 +9,9 @@ */ public final class PartnerRegistrationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerRegistrations_ListByResourceGroup.json */ /** * Sample code: PartnerRegistrations_ListByResourceGroup. 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 7729fdaf2de94..fcfcb4e015677 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,7 +9,9 @@ */ public final class PartnerRegistrationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerRegistrations_ListBySubscription.json */ /** * Sample code: PartnerRegistrations_ListBySubscription. 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 921fe93e76614..d7a2a9bdc35e3 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,7 +13,9 @@ */ public final class PartnerRegistrationsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerRegistrations_Update.json */ /** * Sample code: PartnerRegistrations_Update. 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 37964e33ea3d7..3518b8180d746 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,7 +13,9 @@ */ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: PartnerTopicEventSubscriptions_CreateOrUpdate. 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 8d093a94dad75..1018791d99b17 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,7 +9,9 @@ */ public final class PartnerTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_Delete.json */ /** * Sample code: PartnerTopicEventSubscriptions_Delete. 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 cdd8c2dc1d529..7f879438b3449 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,7 +9,9 @@ */ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: PartnerTopicEventSubscriptions_GetDeliveryAttributes. 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 bf4e4ec119fa5..2efb68668e017 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,7 +9,9 @@ */ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: PartnerTopicEventSubscriptions_GetFullUrl. 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 8f1c667ec6337..c1825e7dfb4cd 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,7 +9,9 @@ */ public final class PartnerTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_Get.json */ /** * Sample code: PartnerTopicEventSubscriptions_Get. 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 3b1c4836de57d..ee6ea38972772 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,7 +9,9 @@ */ public final class PartnerTopicEventSubscriptionsListByPartnerTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_ListByPartnerTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_ListByPartnerTopic.json */ /** * Sample code: PartnerTopicEventSubscriptions_ListByPartnerTopic. 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 3d3935b2b2535..5da96f90bf3e5 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,7 +14,9 @@ */ public final class PartnerTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopicEventSubscriptions_Update.json */ /** * Sample code: PartnerTopicEventSubscriptions_Update. 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 5b894be44a8ba..8192f0ee293db 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 @@ -9,7 +9,9 @@ */ public final class PartnerTopicsActivateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Activate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 7351701e5dc71..1db218b53c26d 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,7 +12,9 @@ */ public final class PartnerTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopics_CreateOrUpdate.json */ /** * Sample code: PartnerTopics_CreateOrUpdate. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateSamples.java index 8add2ba651387..22facc4ed4e97 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 @@ -9,7 +9,9 @@ */ public final class PartnerTopicsDeactivateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Deactivate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 b20a016590e18..e2f1ef29aa366 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 @@ -9,7 +9,9 @@ */ public final class PartnerTopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 1b28854ceebd7..cf933971753e0 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 @@ -9,7 +9,9 @@ */ public final class PartnerTopicsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 9e5a805ffa6e7..d02dae9e94772 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,7 +9,9 @@ */ public final class PartnerTopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopics_ListByResourceGroup.json */ /** * Sample code: PartnerTopics_ListByResourceGroup. 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 2f121af37b9d2..ae4a332aa155c 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,7 +9,9 @@ */ public final class PartnerTopicsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PartnerTopics_ListBySubscription.json */ /** * Sample code: PartnerTopics_ListBySubscription. 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 022894bc054e9..00f8e51f7a83e 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 @@ -13,7 +13,9 @@ */ public final class PartnerTopicsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 3608dfb3ff874..1097732dfbfd2 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,7 +11,9 @@ */ public final class PermissionBindingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PermissionBindings_CreateOrUpdate.json */ /** * Sample code: PermissionBindings_CreateOrUpdate. 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 6973faf76b0fc..a89ec692e5af1 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 @@ -9,7 +9,9 @@ */ public final class PermissionBindingsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 7d4d12733b27b..fb71ee7c28190 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 @@ -9,7 +9,9 @@ */ public final class PermissionBindingsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 b3ec32a9e928d..5b1106f68091b 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,7 +9,9 @@ */ public final class PermissionBindingsListByNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_ListByNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PermissionBindings_ListByNamespace.json */ /** * Sample code: PermissionBindings_ListByNamespace. 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 7ee436c4a0f69..fafbf5fee7b08 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,7 +11,9 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PrivateEndpointConnections_Delete.json */ /** * Sample code: PrivateEndpointConnections_Delete. 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 576a9a5889555..8c3ecdcab0bd0 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,7 +11,9 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PrivateEndpointConnections_Get.json */ /** * Sample code: PrivateEndpointConnections_Get. 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 4a126a04fd870..263204e56e3b2 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,7 +11,9 @@ */ public final class PrivateEndpointConnectionsListByResourceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_ListByResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PrivateEndpointConnections_ListByResource.json */ /** * Sample code: PrivateEndpointConnections_ListByResource. 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 4d6020beffd0a..1cea592e9e2f7 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,7 +14,9 @@ */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PrivateEndpointConnections_Update.json */ /** * Sample code: PrivateEndpointConnections_Update. 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 d8f6b753903fa..002fa60923405 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 @@ -9,7 +9,9 @@ */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateLinkResources_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 f0594c46ea4a8..7c6ae1ad76feb 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,7 +9,9 @@ */ public final class PrivateLinkResourcesListByResourceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByResource.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * PrivateLinkResources_ListByResource.json */ /** * Sample code: PrivateLinkResources_ListByResource. 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 8e6957fc09eac..f34f09b204b56 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,7 +13,9 @@ */ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: SystemTopicEventSubscriptions_CreateOrUpdate. 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 1a09eef8cd19e..aed09d778d3ff 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,7 +9,9 @@ */ public final class SystemTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_Delete.json */ /** * Sample code: SystemTopicEventSubscriptions_Delete. 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 112c77aac417b..de3a74760a8ef 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,7 +9,9 @@ */ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: SystemTopicEventSubscriptions_GetDeliveryAttributes. 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 1e6d2574a0fba..1fd1838ff1cc5 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,7 +9,9 @@ */ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: SystemTopicEventSubscriptions_GetFullUrl. 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 14b043acb7283..79213623eace8 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,7 +9,9 @@ */ public final class SystemTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_Get.json */ /** * Sample code: SystemTopicEventSubscriptions_Get. 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 32f0879b57752..5a8b38091a76f 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,7 +9,9 @@ */ public final class SystemTopicEventSubscriptionsListBySystemTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_ListBySystemTopic.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_ListBySystemTopic.json */ /** * Sample code: SystemTopicEventSubscriptions_ListBySystemTopic. 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 3689f9b454e1c..b86b7f2adc64a 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,7 +14,9 @@ */ public final class SystemTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopicEventSubscriptions_Update.json */ /** * Sample code: SystemTopicEventSubscriptions_Update. 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 24878b553c9d1..934399f1bf86d 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,7 +12,9 @@ */ public final class SystemTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopics_CreateOrUpdate.json */ /** * Sample code: SystemTopics_CreateOrUpdate. 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 dc0ce61ec6452..572445c756f38 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 @@ -9,7 +9,9 @@ */ public final class SystemTopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 95818f006f8a4..f2713ef8ad2a0 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 @@ -9,7 +9,9 @@ */ public final class SystemTopicsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 cb4d95c3fefa1..e931e31727da3 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,7 +9,9 @@ */ public final class SystemTopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopics_ListByResourceGroup.json */ /** * Sample code: SystemTopics_ListByResourceGroup. 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 9516bca7ff2a1..c2162c3d753e9 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,7 +9,9 @@ */ public final class SystemTopicsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * SystemTopics_ListBySubscription.json */ /** * Sample code: SystemTopics_ListBySubscription. 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 670e8cd577fb2..10bafcd61fd38 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 @@ -13,7 +13,9 @@ */ public final class SystemTopicsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 dcdcbd180ff64..9a696f0dc9e24 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,7 +12,9 @@ */ public final class TopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: TopicEventSubscriptions_CreateOrUpdate. 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 1acc111718a0c..c4c3bbd5b8c71 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,7 +9,9 @@ */ public final class TopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_Delete.json */ /** * Sample code: TopicEventSubscriptions_Delete. 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 6109b3ce0d883..9ce78d9f9bc4e 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,7 +9,9 @@ */ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: TopicEventSubscriptions_GetDeliveryAttributes. 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 e13a620edcea7..8a9efe74d6e0f 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,7 +9,9 @@ */ public final class TopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: TopicEventSubscriptions_GetFullUrl. 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 8d33c8bad87ca..d91e28f4dd603 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,7 +9,9 @@ */ public final class TopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_Get.json */ /** * Sample code: TopicEventSubscriptions_Get. 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 635797ef6fcdc..19cf7d25b53c5 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,7 +9,9 @@ */ public final class TopicEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_List.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_List.json */ /** * Sample code: TopicEventSubscriptions_List. 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 3daf9b6461014..b9df88165ecd5 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,7 +14,9 @@ */ public final class TopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicEventSubscriptions_Update.json */ /** * Sample code: TopicEventSubscriptions_Update. 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 967089bdb2f7f..876be50c57c4a 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,7 +11,9 @@ */ public final class TopicSpacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicSpaces_CreateOrUpdate.json */ /** * Sample code: TopicSpaces_CreateOrUpdate. 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 f10c1c7261f01..5a7667d1cbad5 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 @@ -9,7 +9,9 @@ */ public final class TopicSpacesDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 eb3700c132a99..f14a9140de5e5 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 @@ -9,7 +9,9 @@ */ public final class TopicSpacesGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 3fc613202e7bb..2a69da4f537df 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,7 +9,9 @@ */ public final class TopicSpacesListByNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_ListByNamespace.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * TopicSpaces_ListByNamespace.json */ /** * Sample code: TopicSpaces_ListByNamespace. 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 14c91e2c511a4..223909678ebb3 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 @@ -9,7 +9,9 @@ */ public final class TopicTypesGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 381c7028faecd..5ccb1632e7dda 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 @@ -9,7 +9,9 @@ */ public final class TopicTypesListEventTypesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_ListEventTypes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 8a44daac8ccbf..6af1dd009e6bc 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 @@ -9,7 +9,9 @@ */ public final class TopicTypesListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_List.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 84d941622ce86..0fd2f55194e56 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 @@ -19,7 +19,9 @@ */ public final class TopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_CreateOrUpdate.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Topics_CreateOrUpdate.json */ /** * Sample code: Topics_CreateOrUpdate. @@ -40,7 +42,9 @@ public static void topicsCreateOrUpdate(com.azure.resourcemanager.eventgrid.Even } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_CreateOrUpdateForAzureArc.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Topics_CreateOrUpdateForAzureArc.json */ /** * Sample code: Topics_CreateOrUpdateForAzureArc. 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 a502f82c5f407..bdc1be4c23541 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 @@ -9,7 +9,9 @@ */ public final class TopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Delete.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/Topics_Delete. + * json */ /** * Sample code: Topics_Delete. 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 8b785a829af4f..6aa734664fae3 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 @@ -9,7 +9,8 @@ */ public final class TopicsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 00a4035a2ac97..c0d6571df1e84 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,7 +9,9 @@ */ public final class TopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListByResourceGroup.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Topics_ListByResourceGroup.json */ /** * Sample code: Topics_ListByResourceGroup. 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 e04c39c284e8c..9bb6ea833cdff 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 @@ -9,7 +9,9 @@ */ public final class TopicsListEventTypesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListEventTypes.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 05c1333425ccf..a3daabe173de4 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 @@ -9,7 +9,9 @@ */ public final class TopicsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListBySubscription.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 09faa6ddd2607..7da892cd36bd3 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,7 +9,9 @@ */ public final class TopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListSharedAccessKeys.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/examples/ + * Topics_ListSharedAccessKeys.json */ /** * Sample code: Topics_ListSharedAccessKeys. 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 e5d9dfed7bbd1..c9b520ccaa767 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 @@ -11,7 +11,9 @@ */ public final class TopicsRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_RegenerateKey.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 10d6461e03485..f017e7bd3910a 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 @@ -17,7 +17,9 @@ */ public final class TopicsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Update.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 1d834b858e04e..ee669630b997f 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 @@ -9,7 +9,9 @@ */ public final class VerifiedPartnersGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/VerifiedPartners_Get.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 521c02e3eeba4..462f61b5924e4 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 @@ -9,7 +9,9 @@ */ public final class VerifiedPartnersListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/VerifiedPartners_List.json + * x-ms-original-file: + * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-12-15-preview/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 5ea46b4f80436..0000000000000 --- 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 b42ae5129cadd..0000000000000 --- 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 c92a6dc5eeb7f..0000000000000 --- 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 f691bcce702d0..0000000000000 --- 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 f696977498d50..0000000000000 --- 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 efa0c1385feef..0000000000000 --- 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 e9bebd91e49ed..0000000000000 --- 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 0c754555c298c..0000000000000 --- 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 92efc65673852..0000000000000 --- 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 632b86977269f..0000000000000 --- 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 62b52bf37cf89..0000000000000 --- 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 f0814a36e4565..0000000000000 --- 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 57c60c9f41c33..0000000000000 --- 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 bc6205f08a3cb..0000000000000 --- 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 a3b17e1a9fc6f..0000000000000 --- 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.ChannelsListResult; -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 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 66c53fee7f2ae..0000000000000 --- 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 bc65eac3514ef..0000000000000 --- 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 7998289bb9693..0000000000000 --- 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 4a710aab65089..0000000000000 --- 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 5dfad62edb973..0000000000000 --- 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 0f7779a102a0f..0000000000000 --- 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 baf5ac7097008..0000000000000 --- 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 0aabfff594a4a..0000000000000 --- 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 5298996c0d305..0000000000000 --- 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 697d919201abc..0000000000000 --- 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 749767f3325d2..0000000000000 --- 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 ccb8ad4d95c1c..0000000000000 --- 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 136022b0c31d8..0000000000000 --- 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 2d0fe56a43577..0000000000000 --- 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 4251058953524..0000000000000 --- 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 8f20dc38e938c..0000000000000 --- 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.ClientsListResult; -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 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 41ea2b5654a59..0000000000000 --- 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 2fb65c47e2725..0000000000000 --- 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 133b4ac932c17..0000000000000 --- 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 7245afc997de9..0000000000000 --- 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 f92bcbd86ec05..0000000000000 --- 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 b1193687817e2..0000000000000 --- 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 c7558a3f040c3..0000000000000 --- 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 3ffb5db04966e..0000000000000 --- 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 ada0ed9eaad2d..0000000000000 --- 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 15cb6ecc009be..0000000000000 --- 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 f6408d341476d..0000000000000 --- 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 9462a95478e38..0000000000000 --- 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 5cfd5c0099715..0000000000000 --- 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 2a93781e31094..0000000000000 --- 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 7192c79ef767e..0000000000000 --- 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 61b497d1a09e7..0000000000000 --- 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 2769512abadc7..0000000000000 --- 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 894d769cf414a..0000000000000 --- 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 06e597c31e4ec..0000000000000 --- 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 6564b9a48ecfc..0000000000000 --- 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 2e1c754cb3d9c..0000000000000 --- 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 75ee11af7b9ae..0000000000000 --- 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 33fae31ce9200..0000000000000 --- 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 801a2cdaa48b6..0000000000000 --- 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 0fd5e121fc523..0000000000000 --- 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 3b9b90838bf2b..0000000000000 --- 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 b27ad1e2a8dc6..0000000000000 --- 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 42739ae3b324b..0000000000000 --- 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 4e4a061281193..0000000000000 --- 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 6fc65c00b8186..0000000000000 --- 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 41a616a3c4de2..0000000000000 --- 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 12b8bf62b95f8..0000000000000 --- 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 e19a1081ab2a6..0000000000000 --- 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 8e464723d376a..0000000000000 --- 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 ee116ba0d3b8f..0000000000000 --- 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 627499bf5063d..0000000000000 --- 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 d6e977b88d1dc..0000000000000 --- 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 8870798fc8b4c..0000000000000 --- 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 a3198e43ee565..0000000000000 --- 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 6db260724aa05..0000000000000 --- 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 a878a55d1a8c4..0000000000000 --- 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 10f3949fb030a..0000000000000 --- 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 34cf493c68042..0000000000000 --- 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 e962be9f5643f..0000000000000 --- 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 77e91ae842115..0000000000000 --- 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 57056a67198a9..0000000000000 --- 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 fdd2dea44159b..0000000000000 --- 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 61dffc166ca96..0000000000000 --- 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 f8799818fe910..0000000000000 --- 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 b3390e0dfb2a5..0000000000000 --- 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 ced4a0716bcd4..0000000000000 --- 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 cb095e99d54b9..0000000000000 --- 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 0517a09d11d43..0000000000000 --- 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 bbb19bf8f848f..0000000000000 --- 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 637099a9ccf8a..0000000000000 --- 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 f0d31f282c1b3..0000000000000 --- 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 7623b07fc65d1..0000000000000 --- 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 db4020957620f..0000000000000 --- 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 df9c4124eaf6a..0000000000000 --- 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 7afab8ff26438..0000000000000 --- 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 985abf64380e1..0000000000000 --- 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 0ea544c087d42..0000000000000 --- 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 e8b6d39606afa..0000000000000 --- 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 b0ab0fd25a1f0..0000000000000 --- 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 8384abd62b950..0000000000000 --- 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 226d420e614d5..0000000000000 --- 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 7d5ca6afef893..0000000000000 --- 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 c86c21dfabcfa..0000000000000 --- 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 122915e009c47..0000000000000 --- 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 8629b71e3f263..0000000000000 --- 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 14d9e6e2acb85..0000000000000 --- 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 0ac2451da5235..0000000000000 --- 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 a946b262ce952..0000000000000 --- 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 3cac4fec964cd..0000000000000 --- 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 a0f82c13ccb22..0000000000000 --- 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 0b556dabffd51..0000000000000 --- 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 158030bf9f65e..0000000000000 --- 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 47dd28fe24c52..0000000000000 --- 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 0b86d7fa8afe1..0000000000000 --- 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 10e569a46c450..0000000000000 --- 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 651a9c94edb8f..0000000000000 --- 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.TopicsConfiguration; -import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; -import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfigurationState; -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 a6b22dcd0a02d..0000000000000 --- 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 08ba4b4571d4a..0000000000000 --- 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.NetworkSecurityPerimeterConfigurationIssues; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -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 c176778e4e8bb..0000000000000 --- 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 d3c6af889bc6a..0000000000000 --- 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.NetworkSecurityPerimeterConfigurationIssues; -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 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 0c7de2a0c7311..0000000000000 --- 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 bbaf85e20bf98..0000000000000 --- 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 f15156a5d310c..0000000000000 --- 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.NetworkSecurityPerimeterConfigurationIssues; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -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 b6a8f2693ce2f..0000000000000 --- 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 11b1cdc31ab41..0000000000000 --- 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 415037bf181ae..0000000000000 --- 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 53e0b55f122f9..0000000000000 --- 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 e055477e2aad9..0000000000000 --- 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 b659a37a47ca6..0000000000000 --- 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 075481797ee31..0000000000000 --- 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 5b3fc12614a40..0000000000000 --- 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 ba08c4793fd74..0000000000000 --- 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 43d87876a7a0f..0000000000000 --- 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 fd9faeaf3033f..0000000000000 --- 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 2d4230fe3e374..0000000000000 --- 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 81d7bc80f0012..0000000000000 --- 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 274aeb6041642..0000000000000 --- 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 6c466efe039d3..0000000000000 --- 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 f7cc2f3b9cd8f..0000000000000 --- 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 964ad308b022d..0000000000000 --- 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\":\"37d825db-2f0b-4032-a6f6-7a5ac5dfa4a1\",\"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("37d825db-2f0b-4032-a6f6-7a5ac5dfa4a1"), - 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("37d825db-2f0b-4032-a6f6-7a5ac5dfa4a1")) - .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("37d825db-2f0b-4032-a6f6-7a5ac5dfa4a1"), - 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 8c0937d5d4633..0000000000000 --- 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\":\"b27f1931-fb55-40c4-a7a7-ba7868b30425\",\"endpointServiceContext\":\"ltlwtjjguktalhs\",\"expirationTimeIfNotActivatedUtc\":\"2021-06-19T06:58:15Z\",\"provisioningState\":\"Deleting\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"rpoaimlnwi\",\"messageForActivation\":\"omylwea\"}") - .toObject(PartnerDestinationProperties.class); - Assertions.assertEquals(UUID.fromString("b27f1931-fb55-40c4-a7a7-ba7868b30425"), - 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("b27f1931-fb55-40c4-a7a7-ba7868b30425")) - .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("b27f1931-fb55-40c4-a7a7-ba7868b30425"), - 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 02d2c83663f13..0000000000000 --- 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 510afd83747fc..0000000000000 --- 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\":\"ba095bcc-2828-4c96-ab06-535a3c3735fa\",\"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("ba095bcc-2828-4c96-ab06-535a3c3735fa"), - 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 97578b80c59df..0000000000000 --- 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\":\"efca1567-a126-4313-a61e-739836fcd077\",\"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("94b5cdff-fc55-44aa-bb87-6abfb7cafbbf")) - .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("efca1567-a126-4313-a61e-739836fcd077"), - 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 9a1cf29d39b41..0000000000000 --- 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 561d46fd6e718..0000000000000 --- 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\":\"8e0a3c47-9bb9-40e6-995f-6c8f521764df\",\"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("8e0a3c47-9bb9-40e6-995f-6c8f521764df"), - 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 e92e01889f566..0000000000000 --- 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\":\"cb1c6acd-c638-44ff-a116-fd04765e5730\",\"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("cb1c6acd-c638-44ff-a116-fd04765e5730"), - 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 1a4f083b48c65..0000000000000 --- 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\":\"1eb1053c-ddb5-4db5-be49-d19e0ad07882\",\"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("1eb1053c-ddb5-4db5-be49-d19e0ad07882"), - 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 c5137aae1fe55..0000000000000 --- 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\":\"3b510bab-96ed-47b0-8fb5-f48efa1c2f85\",\"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\":\"72c1d23a-dfc0-465f-a9b6-c4d4382e6e56\",\"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\":\"dd8d9f21-e6d2-4a68-87e7-9a638b40591f\",\"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\":\"a234244a-3a4c-4ee3-ae77-d8c6dd2eac8f\",\"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("3b510bab-96ed-47b0-8fb5-f48efa1c2f85"), - 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("3b510bab-96ed-47b0-8fb5-f48efa1c2f85")) - .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("72c1d23a-dfc0-465f-a9b6-c4d4382e6e56")) - .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("dd8d9f21-e6d2-4a68-87e7-9a638b40591f")) - .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("a234244a-3a4c-4ee3-ae77-d8c6dd2eac8f")) - .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("3b510bab-96ed-47b0-8fb5-f48efa1c2f85"), - 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 039849c120eb7..0000000000000 --- 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 2a1d111496560..0000000000000 --- 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 b40c20e8fc0b3..0000000000000 --- 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 a5946eeb43c68..0000000000000 --- 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 fee67084d4fa4..0000000000000 --- 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 aa1ef4b48e75f..0000000000000 --- 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 e081de86ad7bf..0000000000000 --- 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 5789814fee13d..0000000000000 --- 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 56f84ec643830..0000000000000 --- 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 901d4a8f38441..0000000000000 --- 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 e6135d67ab444..0000000000000 --- 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 ed77e9001fdb0..0000000000000 --- 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 6ba385d3f7c11..0000000000000 --- 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\":\"47cc3249-22ca-4c21-b918-a645ee4fd0ad\"},\"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("47cc3249-22ca-4c21-b918-a645ee4fd0ad"), - 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("47cc3249-22ca-4c21-b918-a645ee4fd0ad")); - model = BinaryData.fromObject(model).toObject(PartnerRegistrationInner.class); - Assertions.assertEquals("tqwpwya", model.location()); - Assertions.assertEquals("asqbucljgkyex", model.tags().get("oguyaip")); - Assertions.assertEquals(UUID.fromString("47cc3249-22ca-4c21-b918-a645ee4fd0ad"), - 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 b4e2d7f8277be..0000000000000 --- 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\":\"d589ea2b-bb8a-40d0-b4fc-b89cab03359e\"}") - .toObject(PartnerRegistrationProperties.class); - Assertions.assertEquals(UUID.fromString("d589ea2b-bb8a-40d0-b4fc-b89cab03359e"), - model.partnerRegistrationImmutableId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerRegistrationProperties model = new PartnerRegistrationProperties() - .withPartnerRegistrationImmutableId(UUID.fromString("d589ea2b-bb8a-40d0-b4fc-b89cab03359e")); - model = BinaryData.fromObject(model).toObject(PartnerRegistrationProperties.class); - Assertions.assertEquals(UUID.fromString("d589ea2b-bb8a-40d0-b4fc-b89cab03359e"), - 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 3740f128c5ff4..0000000000000 --- 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 6ececb0cfa71c..0000000000000 --- 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\":\"dd65077b-34b5-45e1-9751-e0faabce068d\"},\"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("0cfa7164-4cc2-4b34-827c-61964056cf15")) - .create(); - - Assertions.assertEquals("hggabqbgamklil", response.location()); - Assertions.assertEquals("d", response.tags().get("ffhsdpzouhk")); - Assertions.assertEquals(UUID.fromString("dd65077b-34b5-45e1-9751-e0faabce068d"), - 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 282193cd2f844..0000000000000 --- 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 08a0d8003aecd..0000000000000 --- 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\":\"08daa1f4-bd90-4620-b5cd-460a4917a9b9\"},\"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("08daa1f4-bd90-4620-b5cd-460a4917a9b9"), - 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 0244b3a88df6a..0000000000000 --- 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\":\"a2a7a6ff-6663-4138-9fad-c92e44f7f011\"},\"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("a2a7a6ff-6663-4138-9fad-c92e44f7f011"), - 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 93a32f18bda69..0000000000000 --- 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\":\"c93fd16e-8054-4011-b133-3f05b727f25c\"},\"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("c93fd16e-8054-4011-b133-3f05b727f25c"), - 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 f91dc6e01be3b..0000000000000 --- 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\":\"c20d298e-645a-4e2c-a4ad-9fd3f8ca88b8\"},\"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("c20d298e-645a-4e2c-a4ad-9fd3f8ca88b8"), - 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("c20d298e-645a-4e2c-a4ad-9fd3f8ca88b8")))) - .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("c20d298e-645a-4e2c-a4ad-9fd3f8ca88b8"), - 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 c170f475b99e4..0000000000000 --- 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 a39fa078f49ec..0000000000000 --- 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 9cf65b6d81fc4..0000000000000 --- 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 ef95d7d886e00..0000000000000 --- 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 25b288b27d19c..0000000000000 --- 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\":\"544ec14c-b34c-439f-ab86-65f0291da90b\",\"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("544ec14c-b34c-439f-ab86-65f0291da90b"), - 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("544ec14c-b34c-439f-ab86-65f0291da90b")) - .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("544ec14c-b34c-439f-ab86-65f0291da90b"), - 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 7c17fd543e25f..0000000000000 --- 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\":\"650859c8-edbd-4b12-a208-cdedada680bb\",\"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("650859c8-edbd-4b12-a208-cdedada680bb"), - 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("650859c8-edbd-4b12-a208-cdedada680bb")) - .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("650859c8-edbd-4b12-a208-cdedada680bb"), - 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 ab0b35a0a211d..0000000000000 --- 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 38621e0342bbe..0000000000000 --- 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\":\"3565650d-eac5-47a5-a420-4b191ca7ed6a\",\"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("3565650d-eac5-47a5-a420-4b191ca7ed6a"), - 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 00ccb01025dc8..0000000000000 --- 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\":\"90bb0e6f-9db9-41c3-bcf2-fa1d78821a2f\",\"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("231746ee-1140-4b42-9504-fe5bf76a39ab")) - .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("90bb0e6f-9db9-41c3-bcf2-fa1d78821a2f"), - 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 2f29fb5b00aa7..0000000000000 --- 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\":\"1078f12b-b946-45d2-bbd1-f679590f2038\",\"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("1078f12b-b946-45d2-bbd1-f679590f2038"), - 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 513e300c9441f..0000000000000 --- 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 a3672bf77012e..0000000000000 --- 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\":\"d957444f-913b-49ef-8248-8583102d1810\",\"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("d957444f-913b-49ef-8248-8583102d1810"), - 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 303017bff4025..0000000000000 --- 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\":\"c9741b68-23dd-4f1a-bae3-116518f67184\",\"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("c9741b68-23dd-4f1a-bae3-116518f67184"), - 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 8c5e1cb5c12cc..0000000000000 --- 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\":\"4263cd53-7dca-4ea5-ad53-1c07e860de81\",\"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("4263cd53-7dca-4ea5-ad53-1c07e860de81"), - 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 48a54c0ab01e5..0000000000000 --- 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\":\"ee177705-35c8-42fb-8f7a-a4ec9d722264\",\"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("ee177705-35c8-42fb-8f7a-a4ec9d722264"), - 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("ee177705-35c8-42fb-8f7a-a4ec9d722264")) - .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("ee177705-35c8-42fb-8f7a-a4ec9d722264"), - 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 3a4c4ba902076..0000000000000 --- 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 5abc605570960..0000000000000 --- 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 a1dba691ab38f..0000000000000 --- 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 93c42673fe6cb..0000000000000 --- 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 e87a4446108f0..0000000000000 --- 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 ad01b0288c2c1..0000000000000 --- 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 deec079afb34c..0000000000000 --- 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 979f116faaace..0000000000000 --- 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 e1f5f479e1809..0000000000000 --- 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 20e193d566761..0000000000000 --- 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 1247e4952a792..0000000000000 --- 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 b33be77b03cbd..0000000000000 --- 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 b57ae14378523..0000000000000 --- 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 c2a3c3107c8fb..0000000000000 --- 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 f27991f3f0fe8..0000000000000 --- 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 eda5f69f89265..0000000000000 --- 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 2ac74d079bdfe..0000000000000 --- 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 b186da44874e7..0000000000000 --- 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 d13bbec1c5edd..0000000000000 --- 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 39b9f0b5a1520..0000000000000 --- 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 1a2c6dc12aa98..0000000000000 --- 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 f9c57689a1c08..0000000000000 --- 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 6fd938af4b791..0000000000000 --- 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 9de6dd9feb1aa..0000000000000 --- 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 5d5101530d2fb..0000000000000 --- 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 bb11d86ea022c..0000000000000 --- 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 5a5c76706fbf4..0000000000000 --- 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 686b6631290ea..0000000000000 --- 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 611114b94199f..0000000000000 --- 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 2f5072ad49069..0000000000000 --- 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 c4b26c39e68f6..0000000000000 --- 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 845baf25d2a1c..0000000000000 --- 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 c84650d6356f1..0000000000000 --- 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 da2a35b9033de..0000000000000 --- 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 9916c09c17c00..0000000000000 --- 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 e3fcb8d07c219..0000000000000 --- 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 450894d89836a..0000000000000 --- 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 b7f2880a98a9e..0000000000000 --- 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 95dd6dd66eb30..0000000000000 --- 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 d96ca532d7c54..0000000000000 --- 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 b90cfe137a231..0000000000000 --- 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 12fa07217274b..0000000000000 --- 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 e1a68a62b511f..0000000000000 --- 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 3f265fbc3d581..0000000000000 --- 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 d5a26b95961b0..0000000000000 --- 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 e36dd8a6b8db8..0000000000000 --- 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 37db1d517f702..0000000000000 --- 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 f5d7a1a3a8354..0000000000000 --- 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 caabf0623a8de..0000000000000 --- 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 d850dea32000c..0000000000000 --- 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 c6458b3e6eda4..0000000000000 --- 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 a685a1172d61c..0000000000000 --- 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 451737d208fed..0000000000000 --- 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 6828113a657b6..0000000000000 --- 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 6a1c74f21e4c7..0000000000000 --- 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 e607195f5bb11..0000000000000 --- 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 136c6a6a1a1e4..0000000000000 --- 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 b3fa7daffc8b0..0000000000000 --- 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 b44697e7826a9..0000000000000 --- 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 35f18d1d86629..0000000000000 --- 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 0d25d7087933e..0000000000000 --- 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 37cdd045a280b..0000000000000 --- 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 47768e31ce8e8..0000000000000 --- 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 8c3ffbb8c223f..0000000000000 --- 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 30e9ed55c2b43..0000000000000 --- 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 ac18d16d6e6fc..0000000000000 --- 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 530c15c357406..0000000000000 --- 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 b296e47f137de..0000000000000 --- 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 37efd52f81091..0000000000000 --- 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.TopicTypesListResult; -import com.azure.resourcemanager.eventgrid.models.TopicTypeSourceScope; -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 1a33d9e30d123..0000000000000 --- 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 beb7944cb7f6a..0000000000000 --- 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 faac954308cf5..0000000000000 --- 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 9b44b8605d489..0000000000000 --- 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 79d5d1fe76664..0000000000000 --- 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 4c726cf661f20..0000000000000 --- 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 c6a09f7aed497..0000000000000 --- 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 f872a3c8ca4ba..0000000000000 --- 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 4a6a75f3a1782..0000000000000 --- 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 4bb5918742d83..0000000000000 --- 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 48c8be139d76c..0000000000000 --- 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\":\"ad4aa056-41d2-4f38-be39-8bc5098c0303\",\"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("ad4aa056-41d2-4f38-be39-8bc5098c0303"), - 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("ad4aa056-41d2-4f38-be39-8bc5098c0303")) - .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("ad4aa056-41d2-4f38-be39-8bc5098c0303"), - 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 04118e3645b6c..0000000000000 --- 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\":\"0d72426b-99e5-47e3-821d-7442e22b0cef\",\"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("0d72426b-99e5-47e3-821d-7442e22b0cef"), - 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("0d72426b-99e5-47e3-821d-7442e22b0cef")) - .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("0d72426b-99e5-47e3-821d-7442e22b0cef"), - 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 f969d301742fe..0000000000000 --- 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\":\"c88e068e-1c95-40ff-a92e-92df8d6491d1\",\"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("c88e068e-1c95-40ff-a92e-92df8d6491d1"), - 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 79c913666ddbb..0000000000000 --- 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\":\"f5b41e6d-332b-4482-8934-a409e26f5bfc\",\"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("f5b41e6d-332b-4482-8934-a409e26f5bfc"), - 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 fbf1bac2f9c8b..0000000000000 --- 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\":\"df8e16ff-9510-4820-9a5c-b2cef01bec1e\",\"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\":\"7431b4aa-0986-45e3-89de-1389da11a64e\",\"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("df8e16ff-9510-4820-9a5c-b2cef01bec1e"), - 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("df8e16ff-9510-4820-9a5c-b2cef01bec1e")) - .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("7431b4aa-0986-45e3-89de-1389da11a64e")) - .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("df8e16ff-9510-4820-9a5c-b2cef01bec1e"), - 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 55743a9418e01..0000000000000 --- 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 f6b89115877d6..0000000000000 --- 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 a949d5b4ee069..0000000000000 --- 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 74a109a0cea25..0000000000000 --- 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 dc6a05f747275..0000000000000 --- 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()); - } -}